zhongfang-zhuang commited on
Commit
3388b80
·
verified ·
1 Parent(s): bff53b4

Upload folder using huggingface_hub

Browse files
.gitattributes CHANGED
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ tokenizer.json filter=lfs diff=lfs merge=lfs -text
Qwen3-1.7B-CSQA-NdLinearLoRA.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d9dbc1819dbd6f801bc1c052f07073c0c3affd9094460af3ed7881cd9502a076
3
+ size 8131640472
README.md CHANGED
@@ -1,3 +1,67 @@
1
- ---
2
- license: apache-2.0
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ language: en
4
+ ---
5
+
6
+ # NdLinear-LoRA Fine-Tuned Models
7
+
8
+ This repository contains a collection of language models fine-tuned using a custom NdLinear-LoRA architecture. NdLinear-LoRA is a variant of Low-Rank Adaptation (LoRA) that reshapes weight matrices into N-dimensional tensors and applies a factorized linear transformation for parameter-efficient fine-tuning.
9
+
10
+ ## Available Models
11
+
12
+ Below is a list of the fine-tuned models. For best results, it's recommended to host each model in its own repository on the Hugging Face Hub.
13
+
14
+ | Fine-Tuned Model Name | Base Model | Fine-Tuning Dataset |
15
+ | ------------------------------------------------ | -------------------------- | ------------------- |
16
+ | `Meta-Llama-3-8B-CSQA-NdLinearLoRA` | `meta-llama/Llama-3-8B` | `commonsense_qa` |
17
+ | `Meta-Llama-3-8B-Math10K-NdLinearLoRA` | `meta-llama/Llama-3-8B` | `lmms-lab/Math10K` |
18
+ | `Qwen3-1.7B-CSQA-NdLinearLoRA` | `Qwen/Qwen3-1.7B-Base` | `commonsense_qa` |
19
+ | `Qwen3-1.7B-Math10K-NdLinearLoRA` | `Qwen/Qwen3-1.7B-Base` | `lmms-lab/Math10K` |
20
+
21
+ ## How to Use
22
+
23
+ Because these models use a custom architecture, you must pass `trust_remote_code=True` when loading them. This allows the `transformers` library to download and use the `modeling_ndlinear.py` file that should be included in each model's repository.
24
+
25
+ **Dependencies:** Before you start, make sure you have the necessary libraries installed:
26
+ ```bash
27
+ pip install torch transformers safetensors huggingface_hub accelerate
28
+ pip install ndlinear
29
+ ```
30
+
31
+ ### Example Loading Script
32
+ This script will work for any of the models listed above. Just change the `REPO_ID`.
33
+
34
+ ```python
35
+ import torch
36
+ from transformers import AutoModelForCausalLM, AutoTokenizer
37
+
38
+ # --- Example Usage ---
39
+
40
+ # 1. Choose the model you want to use from the table above
41
+ # Replace "YourUsername" with your Hugging Face username or organization.
42
+ REPO_ID = "YourUsername/Qwen3-1.7B-Math10K-NdLinearLoRA"
43
+
44
+ # 2. Load the model and tokenizer
45
+ # `trust_remote_code=True` is required to load the custom architecture.
46
+ print(f"Loading model: {REPO_ID}")
47
+ model = AutoModelForCausalLM.from_pretrained(
48
+ REPO_ID,
49
+ torch_dtype="auto",
50
+ device_map="auto",
51
+ trust_remote_code=True
52
+ )
53
+ tokenizer = AutoTokenizer.from_pretrained(REPO_ID)
54
+ print("Model and tokenizer loaded successfully.")
55
+
56
+
57
+ # 3. Generate text
58
+ # This prompt is geared for a math model. Adjust it for a QA model if needed.
59
+ prompt = "### Instruction:\\nSolve the following math problem: If a train travels at 60 miles per hour, how long does it take to travel 180 miles?\\n\\n### Solution:\\n"
60
+ inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
61
+
62
+ with torch.no_grad():
63
+ outputs = model.generate(**inputs, max_new_tokens=150, eos_token_id=tokenizer.eos_token_id)
64
+
65
+ print("\\n--- Generated Output ---")
66
+ print(tokenizer.decode(outputs[0], skip_special_tokens=True))
67
+ ```
added_tokens.json ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "</think>": 151668,
3
+ "</tool_call>": 151658,
4
+ "</tool_response>": 151666,
5
+ "<think>": 151667,
6
+ "<tool_call>": 151657,
7
+ "<tool_response>": 151665,
8
+ "<|box_end|>": 151649,
9
+ "<|box_start|>": 151648,
10
+ "<|endoftext|>": 151643,
11
+ "<|file_sep|>": 151664,
12
+ "<|fim_middle|>": 151660,
13
+ "<|fim_pad|>": 151662,
14
+ "<|fim_prefix|>": 151659,
15
+ "<|fim_suffix|>": 151661,
16
+ "<|im_end|>": 151645,
17
+ "<|im_start|>": 151644,
18
+ "<|image_pad|>": 151655,
19
+ "<|object_ref_end|>": 151647,
20
+ "<|object_ref_start|>": 151646,
21
+ "<|quad_end|>": 151651,
22
+ "<|quad_start|>": 151650,
23
+ "<|repo_name|>": 151663,
24
+ "<|video_pad|>": 151656,
25
+ "<|vision_end|>": 151653,
26
+ "<|vision_pad|>": 151654,
27
+ "<|vision_start|>": 151652
28
+ }
config.json ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "Qwen3ForCausalLM"
4
+ ],
5
+ "attention_bias": false,
6
+ "attention_dropout": 0.0,
7
+ "bos_token_id": 151643,
8
+ "eos_token_id": 151643,
9
+ "head_dim": 128,
10
+ "hidden_act": "silu",
11
+ "hidden_size": 2048,
12
+ "initializer_range": 0.02,
13
+ "intermediate_size": 6144,
14
+ "max_position_embeddings": 32768,
15
+ "max_window_layers": 28,
16
+ "model_type": "qwen3",
17
+ "num_attention_heads": 16,
18
+ "num_hidden_layers": 28,
19
+ "num_key_value_heads": 8,
20
+ "rms_norm_eps": 1e-06,
21
+ "rope_scaling": null,
22
+ "rope_theta": 1000000,
23
+ "sliding_window": null,
24
+ "tie_word_embeddings": true,
25
+ "torch_dtype": "bfloat16",
26
+ "transformers_version": "4.51.0",
27
+ "use_cache": true,
28
+ "use_sliding_window": false,
29
+ "vocab_size": 151936
30
+ }
merges.txt ADDED
The diff for this file is too large to render. See raw diff
 
modeling_ndlinear.py ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import torch
2
+ import torch.nn as nn
3
+ from ndlinear import NdLinear
4
+
5
+ # This file contains the custom building blocks for the NdLinear-LoRA architecture.
6
+ # It should be in the same directory as the model when loading it.
7
+
8
+ def find_factor(n):
9
+ """Finds the most balanced integer factors for n."""
10
+ for i in range(int(n ** 0.5), 0, -1):
11
+ if n % i == 0:
12
+ return (i, n // i)
13
+ return (1, n)
14
+
15
+ class NdLinearLoRA(nn.Module):
16
+ """The NdLinear-LoRA adapter layer."""
17
+ def __init__(self, d_in, d_out, alpha=1.0, dropout=0.0):
18
+ super().__init__()
19
+ self.d_in = d_in
20
+ self.d_out = d_out
21
+ self.in_factors = find_factor(d_in)
22
+ self.out_factors = find_factor(d_out)
23
+ self.adapter = NdLinear(
24
+ input_dims=self.in_factors,
25
+ hidden_size=self.out_factors,
26
+ transform_outer=False,
27
+ bias=False
28
+ )
29
+ self.scaling = alpha
30
+ self.drop = nn.Dropout(dropout)
31
+
32
+ def forward(self, x):
33
+ orig_shape = x.shape
34
+ x = self.drop(x).view(-1, *self.in_factors)
35
+ y = self.adapter(x).view(*orig_shape[:-1], self.d_out)
36
+ return y * self.scaling
37
+
38
+ class LinearWithNdLinearLoRA(nn.Module):
39
+ """A nn.Linear layer wrapped with the NdLinear-LoRA adapter."""
40
+ def __init__(self, base_layer, alpha=1.0, dropout=0.0):
41
+ super().__init__()
42
+ self.base_layer = base_layer
43
+ for param in self.base_layer.parameters():
44
+ param.requires_grad = False
45
+ self.adapter = NdLinearLoRA(
46
+ d_in=self.base_layer.in_features,
47
+ d_out=self.base_layer.out_features,
48
+ alpha=alpha,
49
+ dropout=dropout
50
+ )
51
+
52
+ def forward(self, x):
53
+ return self.base_layer(x) + self.adapter(x)
ndlinear.py ADDED
@@ -0,0 +1,82 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import torch
2
+ import torch.nn as nn
3
+ import torch.optim as optim
4
+
5
+
6
+ class NdLinear(nn.Module):
7
+ def __init__(self, input_dims: tuple, hidden_size: tuple, transform_outer=True, bias: bool = True):
8
+ """
9
+ NdLinear: A PyTorch layer for projecting tensors into multi-space representations.
10
+
11
+ Unlike conventional embedding layers that map into a single vector space, NdLinear
12
+ transforms tensors across a collection of vector spaces, capturing multivariate structure
13
+ and topical information that standard deep learning architectures typically lose.
14
+
15
+ Args:
16
+ input_dims (tuple): Shape of input tensor (excluding batch dimension).
17
+ hidden_size (tuple): Target hidden dimensions after transformation.
18
+ """
19
+ super(NdLinear, self).__init__()
20
+
21
+ if len(input_dims) != len(hidden_size):
22
+ raise Exception("Input shape and hidden shape do not match.")
23
+
24
+ self.input_dims = input_dims
25
+ self.hidden_size = hidden_size
26
+ self.num_layers = len(input_dims) # Must match since dims are equal
27
+ # self.relu = nn.ReLU() # self.relu is not being used.
28
+ self.transform_outer = transform_outer
29
+ self.bias = bias
30
+
31
+ # Define transformation layers per dimension
32
+ self.align_layers = nn.ModuleList([
33
+ nn.Linear(input_dims[i], hidden_size[i], bias=self.bias) for i in range(self.num_layers)
34
+ ])
35
+
36
+
37
+ def forward(self, X):
38
+ """
39
+ Forward pass to project input tensor into a new multi-space representation.
40
+ - Incrementally transposes, flattens, applies linear layers, and restores shape.
41
+
42
+ Expected Input Shape: [batch_size, *input_dims]
43
+ Output Shape: [batch_size, *hidden_size]
44
+
45
+ Args:
46
+ X (torch.Tensor): Input tensor with shape [batch_size, *input_dims]
47
+
48
+ Returns:
49
+ torch.Tensor: Output tensor with shape [batch_size, *hidden_size]
50
+ """
51
+ num_transforms = self.num_layers # Number of transformations
52
+
53
+ # Define iteration order
54
+ # transform_indices = range(num_transforms) if transform_outer else reversed(range(num_transforms))
55
+
56
+ for i in range(num_transforms):
57
+ if self.transform_outer:
58
+ layer = self.align_layers[i]
59
+ transpose_dim = i + 1
60
+ else:
61
+ layer = self.align_layers[num_transforms - (i+1)]
62
+ transpose_dim = num_transforms - i
63
+
64
+ # Transpose the selected dimension to the last position
65
+ X = torch.transpose(X, transpose_dim, num_transforms).contiguous()
66
+
67
+ # Store original shape before transformation
68
+ X_size = X.shape[:-1]
69
+
70
+ # Flatten everything except the last dimension
71
+ X = X.view(-1, X.shape[-1])
72
+
73
+ # Apply transformation
74
+ X = layer(X)
75
+
76
+ # Reshape back to the original spatial structure (with new embedding dim)
77
+ X = X.view(*X_size, X.shape[-1])
78
+
79
+ # Transpose the dimension back to its original position
80
+ X = torch.transpose(X, transpose_dim, num_transforms).contiguous()
81
+
82
+ return X
ndlinear_lora_config.json ADDED
@@ -0,0 +1,2372 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "model_name": "Qwen/Qwen3-1.7B-Base",
3
+ "lora_r": 1,
4
+ "lora_alpha": 1,
5
+ "target_modules": [
6
+ "q_proj",
7
+ "k_proj",
8
+ "v_proj",
9
+ "o_proj",
10
+ "gate_proj",
11
+ "up_proj",
12
+ "down_proj"
13
+ ],
14
+ "use_factorized": true,
15
+ "wrapped_modules": {
16
+ "model.layers.0.self_attn.q_proj": {
17
+ "in_features": 2048,
18
+ "out_features": 2048,
19
+ "in_factors": [
20
+ 32,
21
+ 64
22
+ ],
23
+ "out_factors": [
24
+ 32,
25
+ 64
26
+ ]
27
+ },
28
+ "model.layers.0.self_attn.k_proj": {
29
+ "in_features": 2048,
30
+ "out_features": 1024,
31
+ "in_factors": [
32
+ 32,
33
+ 64
34
+ ],
35
+ "out_factors": [
36
+ 32,
37
+ 32
38
+ ]
39
+ },
40
+ "model.layers.0.self_attn.v_proj": {
41
+ "in_features": 2048,
42
+ "out_features": 1024,
43
+ "in_factors": [
44
+ 32,
45
+ 64
46
+ ],
47
+ "out_factors": [
48
+ 32,
49
+ 32
50
+ ]
51
+ },
52
+ "model.layers.0.self_attn.o_proj": {
53
+ "in_features": 2048,
54
+ "out_features": 2048,
55
+ "in_factors": [
56
+ 32,
57
+ 64
58
+ ],
59
+ "out_factors": [
60
+ 32,
61
+ 64
62
+ ]
63
+ },
64
+ "model.layers.0.mlp.gate_proj": {
65
+ "in_features": 2048,
66
+ "out_features": 6144,
67
+ "in_factors": [
68
+ 32,
69
+ 64
70
+ ],
71
+ "out_factors": [
72
+ 64,
73
+ 96
74
+ ]
75
+ },
76
+ "model.layers.0.mlp.up_proj": {
77
+ "in_features": 2048,
78
+ "out_features": 6144,
79
+ "in_factors": [
80
+ 32,
81
+ 64
82
+ ],
83
+ "out_factors": [
84
+ 64,
85
+ 96
86
+ ]
87
+ },
88
+ "model.layers.0.mlp.down_proj": {
89
+ "in_features": 6144,
90
+ "out_features": 2048,
91
+ "in_factors": [
92
+ 64,
93
+ 96
94
+ ],
95
+ "out_factors": [
96
+ 32,
97
+ 64
98
+ ]
99
+ },
100
+ "model.layers.1.self_attn.q_proj": {
101
+ "in_features": 2048,
102
+ "out_features": 2048,
103
+ "in_factors": [
104
+ 32,
105
+ 64
106
+ ],
107
+ "out_factors": [
108
+ 32,
109
+ 64
110
+ ]
111
+ },
112
+ "model.layers.1.self_attn.k_proj": {
113
+ "in_features": 2048,
114
+ "out_features": 1024,
115
+ "in_factors": [
116
+ 32,
117
+ 64
118
+ ],
119
+ "out_factors": [
120
+ 32,
121
+ 32
122
+ ]
123
+ },
124
+ "model.layers.1.self_attn.v_proj": {
125
+ "in_features": 2048,
126
+ "out_features": 1024,
127
+ "in_factors": [
128
+ 32,
129
+ 64
130
+ ],
131
+ "out_factors": [
132
+ 32,
133
+ 32
134
+ ]
135
+ },
136
+ "model.layers.1.self_attn.o_proj": {
137
+ "in_features": 2048,
138
+ "out_features": 2048,
139
+ "in_factors": [
140
+ 32,
141
+ 64
142
+ ],
143
+ "out_factors": [
144
+ 32,
145
+ 64
146
+ ]
147
+ },
148
+ "model.layers.1.mlp.gate_proj": {
149
+ "in_features": 2048,
150
+ "out_features": 6144,
151
+ "in_factors": [
152
+ 32,
153
+ 64
154
+ ],
155
+ "out_factors": [
156
+ 64,
157
+ 96
158
+ ]
159
+ },
160
+ "model.layers.1.mlp.up_proj": {
161
+ "in_features": 2048,
162
+ "out_features": 6144,
163
+ "in_factors": [
164
+ 32,
165
+ 64
166
+ ],
167
+ "out_factors": [
168
+ 64,
169
+ 96
170
+ ]
171
+ },
172
+ "model.layers.1.mlp.down_proj": {
173
+ "in_features": 6144,
174
+ "out_features": 2048,
175
+ "in_factors": [
176
+ 64,
177
+ 96
178
+ ],
179
+ "out_factors": [
180
+ 32,
181
+ 64
182
+ ]
183
+ },
184
+ "model.layers.2.self_attn.q_proj": {
185
+ "in_features": 2048,
186
+ "out_features": 2048,
187
+ "in_factors": [
188
+ 32,
189
+ 64
190
+ ],
191
+ "out_factors": [
192
+ 32,
193
+ 64
194
+ ]
195
+ },
196
+ "model.layers.2.self_attn.k_proj": {
197
+ "in_features": 2048,
198
+ "out_features": 1024,
199
+ "in_factors": [
200
+ 32,
201
+ 64
202
+ ],
203
+ "out_factors": [
204
+ 32,
205
+ 32
206
+ ]
207
+ },
208
+ "model.layers.2.self_attn.v_proj": {
209
+ "in_features": 2048,
210
+ "out_features": 1024,
211
+ "in_factors": [
212
+ 32,
213
+ 64
214
+ ],
215
+ "out_factors": [
216
+ 32,
217
+ 32
218
+ ]
219
+ },
220
+ "model.layers.2.self_attn.o_proj": {
221
+ "in_features": 2048,
222
+ "out_features": 2048,
223
+ "in_factors": [
224
+ 32,
225
+ 64
226
+ ],
227
+ "out_factors": [
228
+ 32,
229
+ 64
230
+ ]
231
+ },
232
+ "model.layers.2.mlp.gate_proj": {
233
+ "in_features": 2048,
234
+ "out_features": 6144,
235
+ "in_factors": [
236
+ 32,
237
+ 64
238
+ ],
239
+ "out_factors": [
240
+ 64,
241
+ 96
242
+ ]
243
+ },
244
+ "model.layers.2.mlp.up_proj": {
245
+ "in_features": 2048,
246
+ "out_features": 6144,
247
+ "in_factors": [
248
+ 32,
249
+ 64
250
+ ],
251
+ "out_factors": [
252
+ 64,
253
+ 96
254
+ ]
255
+ },
256
+ "model.layers.2.mlp.down_proj": {
257
+ "in_features": 6144,
258
+ "out_features": 2048,
259
+ "in_factors": [
260
+ 64,
261
+ 96
262
+ ],
263
+ "out_factors": [
264
+ 32,
265
+ 64
266
+ ]
267
+ },
268
+ "model.layers.3.self_attn.q_proj": {
269
+ "in_features": 2048,
270
+ "out_features": 2048,
271
+ "in_factors": [
272
+ 32,
273
+ 64
274
+ ],
275
+ "out_factors": [
276
+ 32,
277
+ 64
278
+ ]
279
+ },
280
+ "model.layers.3.self_attn.k_proj": {
281
+ "in_features": 2048,
282
+ "out_features": 1024,
283
+ "in_factors": [
284
+ 32,
285
+ 64
286
+ ],
287
+ "out_factors": [
288
+ 32,
289
+ 32
290
+ ]
291
+ },
292
+ "model.layers.3.self_attn.v_proj": {
293
+ "in_features": 2048,
294
+ "out_features": 1024,
295
+ "in_factors": [
296
+ 32,
297
+ 64
298
+ ],
299
+ "out_factors": [
300
+ 32,
301
+ 32
302
+ ]
303
+ },
304
+ "model.layers.3.self_attn.o_proj": {
305
+ "in_features": 2048,
306
+ "out_features": 2048,
307
+ "in_factors": [
308
+ 32,
309
+ 64
310
+ ],
311
+ "out_factors": [
312
+ 32,
313
+ 64
314
+ ]
315
+ },
316
+ "model.layers.3.mlp.gate_proj": {
317
+ "in_features": 2048,
318
+ "out_features": 6144,
319
+ "in_factors": [
320
+ 32,
321
+ 64
322
+ ],
323
+ "out_factors": [
324
+ 64,
325
+ 96
326
+ ]
327
+ },
328
+ "model.layers.3.mlp.up_proj": {
329
+ "in_features": 2048,
330
+ "out_features": 6144,
331
+ "in_factors": [
332
+ 32,
333
+ 64
334
+ ],
335
+ "out_factors": [
336
+ 64,
337
+ 96
338
+ ]
339
+ },
340
+ "model.layers.3.mlp.down_proj": {
341
+ "in_features": 6144,
342
+ "out_features": 2048,
343
+ "in_factors": [
344
+ 64,
345
+ 96
346
+ ],
347
+ "out_factors": [
348
+ 32,
349
+ 64
350
+ ]
351
+ },
352
+ "model.layers.4.self_attn.q_proj": {
353
+ "in_features": 2048,
354
+ "out_features": 2048,
355
+ "in_factors": [
356
+ 32,
357
+ 64
358
+ ],
359
+ "out_factors": [
360
+ 32,
361
+ 64
362
+ ]
363
+ },
364
+ "model.layers.4.self_attn.k_proj": {
365
+ "in_features": 2048,
366
+ "out_features": 1024,
367
+ "in_factors": [
368
+ 32,
369
+ 64
370
+ ],
371
+ "out_factors": [
372
+ 32,
373
+ 32
374
+ ]
375
+ },
376
+ "model.layers.4.self_attn.v_proj": {
377
+ "in_features": 2048,
378
+ "out_features": 1024,
379
+ "in_factors": [
380
+ 32,
381
+ 64
382
+ ],
383
+ "out_factors": [
384
+ 32,
385
+ 32
386
+ ]
387
+ },
388
+ "model.layers.4.self_attn.o_proj": {
389
+ "in_features": 2048,
390
+ "out_features": 2048,
391
+ "in_factors": [
392
+ 32,
393
+ 64
394
+ ],
395
+ "out_factors": [
396
+ 32,
397
+ 64
398
+ ]
399
+ },
400
+ "model.layers.4.mlp.gate_proj": {
401
+ "in_features": 2048,
402
+ "out_features": 6144,
403
+ "in_factors": [
404
+ 32,
405
+ 64
406
+ ],
407
+ "out_factors": [
408
+ 64,
409
+ 96
410
+ ]
411
+ },
412
+ "model.layers.4.mlp.up_proj": {
413
+ "in_features": 2048,
414
+ "out_features": 6144,
415
+ "in_factors": [
416
+ 32,
417
+ 64
418
+ ],
419
+ "out_factors": [
420
+ 64,
421
+ 96
422
+ ]
423
+ },
424
+ "model.layers.4.mlp.down_proj": {
425
+ "in_features": 6144,
426
+ "out_features": 2048,
427
+ "in_factors": [
428
+ 64,
429
+ 96
430
+ ],
431
+ "out_factors": [
432
+ 32,
433
+ 64
434
+ ]
435
+ },
436
+ "model.layers.5.self_attn.q_proj": {
437
+ "in_features": 2048,
438
+ "out_features": 2048,
439
+ "in_factors": [
440
+ 32,
441
+ 64
442
+ ],
443
+ "out_factors": [
444
+ 32,
445
+ 64
446
+ ]
447
+ },
448
+ "model.layers.5.self_attn.k_proj": {
449
+ "in_features": 2048,
450
+ "out_features": 1024,
451
+ "in_factors": [
452
+ 32,
453
+ 64
454
+ ],
455
+ "out_factors": [
456
+ 32,
457
+ 32
458
+ ]
459
+ },
460
+ "model.layers.5.self_attn.v_proj": {
461
+ "in_features": 2048,
462
+ "out_features": 1024,
463
+ "in_factors": [
464
+ 32,
465
+ 64
466
+ ],
467
+ "out_factors": [
468
+ 32,
469
+ 32
470
+ ]
471
+ },
472
+ "model.layers.5.self_attn.o_proj": {
473
+ "in_features": 2048,
474
+ "out_features": 2048,
475
+ "in_factors": [
476
+ 32,
477
+ 64
478
+ ],
479
+ "out_factors": [
480
+ 32,
481
+ 64
482
+ ]
483
+ },
484
+ "model.layers.5.mlp.gate_proj": {
485
+ "in_features": 2048,
486
+ "out_features": 6144,
487
+ "in_factors": [
488
+ 32,
489
+ 64
490
+ ],
491
+ "out_factors": [
492
+ 64,
493
+ 96
494
+ ]
495
+ },
496
+ "model.layers.5.mlp.up_proj": {
497
+ "in_features": 2048,
498
+ "out_features": 6144,
499
+ "in_factors": [
500
+ 32,
501
+ 64
502
+ ],
503
+ "out_factors": [
504
+ 64,
505
+ 96
506
+ ]
507
+ },
508
+ "model.layers.5.mlp.down_proj": {
509
+ "in_features": 6144,
510
+ "out_features": 2048,
511
+ "in_factors": [
512
+ 64,
513
+ 96
514
+ ],
515
+ "out_factors": [
516
+ 32,
517
+ 64
518
+ ]
519
+ },
520
+ "model.layers.6.self_attn.q_proj": {
521
+ "in_features": 2048,
522
+ "out_features": 2048,
523
+ "in_factors": [
524
+ 32,
525
+ 64
526
+ ],
527
+ "out_factors": [
528
+ 32,
529
+ 64
530
+ ]
531
+ },
532
+ "model.layers.6.self_attn.k_proj": {
533
+ "in_features": 2048,
534
+ "out_features": 1024,
535
+ "in_factors": [
536
+ 32,
537
+ 64
538
+ ],
539
+ "out_factors": [
540
+ 32,
541
+ 32
542
+ ]
543
+ },
544
+ "model.layers.6.self_attn.v_proj": {
545
+ "in_features": 2048,
546
+ "out_features": 1024,
547
+ "in_factors": [
548
+ 32,
549
+ 64
550
+ ],
551
+ "out_factors": [
552
+ 32,
553
+ 32
554
+ ]
555
+ },
556
+ "model.layers.6.self_attn.o_proj": {
557
+ "in_features": 2048,
558
+ "out_features": 2048,
559
+ "in_factors": [
560
+ 32,
561
+ 64
562
+ ],
563
+ "out_factors": [
564
+ 32,
565
+ 64
566
+ ]
567
+ },
568
+ "model.layers.6.mlp.gate_proj": {
569
+ "in_features": 2048,
570
+ "out_features": 6144,
571
+ "in_factors": [
572
+ 32,
573
+ 64
574
+ ],
575
+ "out_factors": [
576
+ 64,
577
+ 96
578
+ ]
579
+ },
580
+ "model.layers.6.mlp.up_proj": {
581
+ "in_features": 2048,
582
+ "out_features": 6144,
583
+ "in_factors": [
584
+ 32,
585
+ 64
586
+ ],
587
+ "out_factors": [
588
+ 64,
589
+ 96
590
+ ]
591
+ },
592
+ "model.layers.6.mlp.down_proj": {
593
+ "in_features": 6144,
594
+ "out_features": 2048,
595
+ "in_factors": [
596
+ 64,
597
+ 96
598
+ ],
599
+ "out_factors": [
600
+ 32,
601
+ 64
602
+ ]
603
+ },
604
+ "model.layers.7.self_attn.q_proj": {
605
+ "in_features": 2048,
606
+ "out_features": 2048,
607
+ "in_factors": [
608
+ 32,
609
+ 64
610
+ ],
611
+ "out_factors": [
612
+ 32,
613
+ 64
614
+ ]
615
+ },
616
+ "model.layers.7.self_attn.k_proj": {
617
+ "in_features": 2048,
618
+ "out_features": 1024,
619
+ "in_factors": [
620
+ 32,
621
+ 64
622
+ ],
623
+ "out_factors": [
624
+ 32,
625
+ 32
626
+ ]
627
+ },
628
+ "model.layers.7.self_attn.v_proj": {
629
+ "in_features": 2048,
630
+ "out_features": 1024,
631
+ "in_factors": [
632
+ 32,
633
+ 64
634
+ ],
635
+ "out_factors": [
636
+ 32,
637
+ 32
638
+ ]
639
+ },
640
+ "model.layers.7.self_attn.o_proj": {
641
+ "in_features": 2048,
642
+ "out_features": 2048,
643
+ "in_factors": [
644
+ 32,
645
+ 64
646
+ ],
647
+ "out_factors": [
648
+ 32,
649
+ 64
650
+ ]
651
+ },
652
+ "model.layers.7.mlp.gate_proj": {
653
+ "in_features": 2048,
654
+ "out_features": 6144,
655
+ "in_factors": [
656
+ 32,
657
+ 64
658
+ ],
659
+ "out_factors": [
660
+ 64,
661
+ 96
662
+ ]
663
+ },
664
+ "model.layers.7.mlp.up_proj": {
665
+ "in_features": 2048,
666
+ "out_features": 6144,
667
+ "in_factors": [
668
+ 32,
669
+ 64
670
+ ],
671
+ "out_factors": [
672
+ 64,
673
+ 96
674
+ ]
675
+ },
676
+ "model.layers.7.mlp.down_proj": {
677
+ "in_features": 6144,
678
+ "out_features": 2048,
679
+ "in_factors": [
680
+ 64,
681
+ 96
682
+ ],
683
+ "out_factors": [
684
+ 32,
685
+ 64
686
+ ]
687
+ },
688
+ "model.layers.8.self_attn.q_proj": {
689
+ "in_features": 2048,
690
+ "out_features": 2048,
691
+ "in_factors": [
692
+ 32,
693
+ 64
694
+ ],
695
+ "out_factors": [
696
+ 32,
697
+ 64
698
+ ]
699
+ },
700
+ "model.layers.8.self_attn.k_proj": {
701
+ "in_features": 2048,
702
+ "out_features": 1024,
703
+ "in_factors": [
704
+ 32,
705
+ 64
706
+ ],
707
+ "out_factors": [
708
+ 32,
709
+ 32
710
+ ]
711
+ },
712
+ "model.layers.8.self_attn.v_proj": {
713
+ "in_features": 2048,
714
+ "out_features": 1024,
715
+ "in_factors": [
716
+ 32,
717
+ 64
718
+ ],
719
+ "out_factors": [
720
+ 32,
721
+ 32
722
+ ]
723
+ },
724
+ "model.layers.8.self_attn.o_proj": {
725
+ "in_features": 2048,
726
+ "out_features": 2048,
727
+ "in_factors": [
728
+ 32,
729
+ 64
730
+ ],
731
+ "out_factors": [
732
+ 32,
733
+ 64
734
+ ]
735
+ },
736
+ "model.layers.8.mlp.gate_proj": {
737
+ "in_features": 2048,
738
+ "out_features": 6144,
739
+ "in_factors": [
740
+ 32,
741
+ 64
742
+ ],
743
+ "out_factors": [
744
+ 64,
745
+ 96
746
+ ]
747
+ },
748
+ "model.layers.8.mlp.up_proj": {
749
+ "in_features": 2048,
750
+ "out_features": 6144,
751
+ "in_factors": [
752
+ 32,
753
+ 64
754
+ ],
755
+ "out_factors": [
756
+ 64,
757
+ 96
758
+ ]
759
+ },
760
+ "model.layers.8.mlp.down_proj": {
761
+ "in_features": 6144,
762
+ "out_features": 2048,
763
+ "in_factors": [
764
+ 64,
765
+ 96
766
+ ],
767
+ "out_factors": [
768
+ 32,
769
+ 64
770
+ ]
771
+ },
772
+ "model.layers.9.self_attn.q_proj": {
773
+ "in_features": 2048,
774
+ "out_features": 2048,
775
+ "in_factors": [
776
+ 32,
777
+ 64
778
+ ],
779
+ "out_factors": [
780
+ 32,
781
+ 64
782
+ ]
783
+ },
784
+ "model.layers.9.self_attn.k_proj": {
785
+ "in_features": 2048,
786
+ "out_features": 1024,
787
+ "in_factors": [
788
+ 32,
789
+ 64
790
+ ],
791
+ "out_factors": [
792
+ 32,
793
+ 32
794
+ ]
795
+ },
796
+ "model.layers.9.self_attn.v_proj": {
797
+ "in_features": 2048,
798
+ "out_features": 1024,
799
+ "in_factors": [
800
+ 32,
801
+ 64
802
+ ],
803
+ "out_factors": [
804
+ 32,
805
+ 32
806
+ ]
807
+ },
808
+ "model.layers.9.self_attn.o_proj": {
809
+ "in_features": 2048,
810
+ "out_features": 2048,
811
+ "in_factors": [
812
+ 32,
813
+ 64
814
+ ],
815
+ "out_factors": [
816
+ 32,
817
+ 64
818
+ ]
819
+ },
820
+ "model.layers.9.mlp.gate_proj": {
821
+ "in_features": 2048,
822
+ "out_features": 6144,
823
+ "in_factors": [
824
+ 32,
825
+ 64
826
+ ],
827
+ "out_factors": [
828
+ 64,
829
+ 96
830
+ ]
831
+ },
832
+ "model.layers.9.mlp.up_proj": {
833
+ "in_features": 2048,
834
+ "out_features": 6144,
835
+ "in_factors": [
836
+ 32,
837
+ 64
838
+ ],
839
+ "out_factors": [
840
+ 64,
841
+ 96
842
+ ]
843
+ },
844
+ "model.layers.9.mlp.down_proj": {
845
+ "in_features": 6144,
846
+ "out_features": 2048,
847
+ "in_factors": [
848
+ 64,
849
+ 96
850
+ ],
851
+ "out_factors": [
852
+ 32,
853
+ 64
854
+ ]
855
+ },
856
+ "model.layers.10.self_attn.q_proj": {
857
+ "in_features": 2048,
858
+ "out_features": 2048,
859
+ "in_factors": [
860
+ 32,
861
+ 64
862
+ ],
863
+ "out_factors": [
864
+ 32,
865
+ 64
866
+ ]
867
+ },
868
+ "model.layers.10.self_attn.k_proj": {
869
+ "in_features": 2048,
870
+ "out_features": 1024,
871
+ "in_factors": [
872
+ 32,
873
+ 64
874
+ ],
875
+ "out_factors": [
876
+ 32,
877
+ 32
878
+ ]
879
+ },
880
+ "model.layers.10.self_attn.v_proj": {
881
+ "in_features": 2048,
882
+ "out_features": 1024,
883
+ "in_factors": [
884
+ 32,
885
+ 64
886
+ ],
887
+ "out_factors": [
888
+ 32,
889
+ 32
890
+ ]
891
+ },
892
+ "model.layers.10.self_attn.o_proj": {
893
+ "in_features": 2048,
894
+ "out_features": 2048,
895
+ "in_factors": [
896
+ 32,
897
+ 64
898
+ ],
899
+ "out_factors": [
900
+ 32,
901
+ 64
902
+ ]
903
+ },
904
+ "model.layers.10.mlp.gate_proj": {
905
+ "in_features": 2048,
906
+ "out_features": 6144,
907
+ "in_factors": [
908
+ 32,
909
+ 64
910
+ ],
911
+ "out_factors": [
912
+ 64,
913
+ 96
914
+ ]
915
+ },
916
+ "model.layers.10.mlp.up_proj": {
917
+ "in_features": 2048,
918
+ "out_features": 6144,
919
+ "in_factors": [
920
+ 32,
921
+ 64
922
+ ],
923
+ "out_factors": [
924
+ 64,
925
+ 96
926
+ ]
927
+ },
928
+ "model.layers.10.mlp.down_proj": {
929
+ "in_features": 6144,
930
+ "out_features": 2048,
931
+ "in_factors": [
932
+ 64,
933
+ 96
934
+ ],
935
+ "out_factors": [
936
+ 32,
937
+ 64
938
+ ]
939
+ },
940
+ "model.layers.11.self_attn.q_proj": {
941
+ "in_features": 2048,
942
+ "out_features": 2048,
943
+ "in_factors": [
944
+ 32,
945
+ 64
946
+ ],
947
+ "out_factors": [
948
+ 32,
949
+ 64
950
+ ]
951
+ },
952
+ "model.layers.11.self_attn.k_proj": {
953
+ "in_features": 2048,
954
+ "out_features": 1024,
955
+ "in_factors": [
956
+ 32,
957
+ 64
958
+ ],
959
+ "out_factors": [
960
+ 32,
961
+ 32
962
+ ]
963
+ },
964
+ "model.layers.11.self_attn.v_proj": {
965
+ "in_features": 2048,
966
+ "out_features": 1024,
967
+ "in_factors": [
968
+ 32,
969
+ 64
970
+ ],
971
+ "out_factors": [
972
+ 32,
973
+ 32
974
+ ]
975
+ },
976
+ "model.layers.11.self_attn.o_proj": {
977
+ "in_features": 2048,
978
+ "out_features": 2048,
979
+ "in_factors": [
980
+ 32,
981
+ 64
982
+ ],
983
+ "out_factors": [
984
+ 32,
985
+ 64
986
+ ]
987
+ },
988
+ "model.layers.11.mlp.gate_proj": {
989
+ "in_features": 2048,
990
+ "out_features": 6144,
991
+ "in_factors": [
992
+ 32,
993
+ 64
994
+ ],
995
+ "out_factors": [
996
+ 64,
997
+ 96
998
+ ]
999
+ },
1000
+ "model.layers.11.mlp.up_proj": {
1001
+ "in_features": 2048,
1002
+ "out_features": 6144,
1003
+ "in_factors": [
1004
+ 32,
1005
+ 64
1006
+ ],
1007
+ "out_factors": [
1008
+ 64,
1009
+ 96
1010
+ ]
1011
+ },
1012
+ "model.layers.11.mlp.down_proj": {
1013
+ "in_features": 6144,
1014
+ "out_features": 2048,
1015
+ "in_factors": [
1016
+ 64,
1017
+ 96
1018
+ ],
1019
+ "out_factors": [
1020
+ 32,
1021
+ 64
1022
+ ]
1023
+ },
1024
+ "model.layers.12.self_attn.q_proj": {
1025
+ "in_features": 2048,
1026
+ "out_features": 2048,
1027
+ "in_factors": [
1028
+ 32,
1029
+ 64
1030
+ ],
1031
+ "out_factors": [
1032
+ 32,
1033
+ 64
1034
+ ]
1035
+ },
1036
+ "model.layers.12.self_attn.k_proj": {
1037
+ "in_features": 2048,
1038
+ "out_features": 1024,
1039
+ "in_factors": [
1040
+ 32,
1041
+ 64
1042
+ ],
1043
+ "out_factors": [
1044
+ 32,
1045
+ 32
1046
+ ]
1047
+ },
1048
+ "model.layers.12.self_attn.v_proj": {
1049
+ "in_features": 2048,
1050
+ "out_features": 1024,
1051
+ "in_factors": [
1052
+ 32,
1053
+ 64
1054
+ ],
1055
+ "out_factors": [
1056
+ 32,
1057
+ 32
1058
+ ]
1059
+ },
1060
+ "model.layers.12.self_attn.o_proj": {
1061
+ "in_features": 2048,
1062
+ "out_features": 2048,
1063
+ "in_factors": [
1064
+ 32,
1065
+ 64
1066
+ ],
1067
+ "out_factors": [
1068
+ 32,
1069
+ 64
1070
+ ]
1071
+ },
1072
+ "model.layers.12.mlp.gate_proj": {
1073
+ "in_features": 2048,
1074
+ "out_features": 6144,
1075
+ "in_factors": [
1076
+ 32,
1077
+ 64
1078
+ ],
1079
+ "out_factors": [
1080
+ 64,
1081
+ 96
1082
+ ]
1083
+ },
1084
+ "model.layers.12.mlp.up_proj": {
1085
+ "in_features": 2048,
1086
+ "out_features": 6144,
1087
+ "in_factors": [
1088
+ 32,
1089
+ 64
1090
+ ],
1091
+ "out_factors": [
1092
+ 64,
1093
+ 96
1094
+ ]
1095
+ },
1096
+ "model.layers.12.mlp.down_proj": {
1097
+ "in_features": 6144,
1098
+ "out_features": 2048,
1099
+ "in_factors": [
1100
+ 64,
1101
+ 96
1102
+ ],
1103
+ "out_factors": [
1104
+ 32,
1105
+ 64
1106
+ ]
1107
+ },
1108
+ "model.layers.13.self_attn.q_proj": {
1109
+ "in_features": 2048,
1110
+ "out_features": 2048,
1111
+ "in_factors": [
1112
+ 32,
1113
+ 64
1114
+ ],
1115
+ "out_factors": [
1116
+ 32,
1117
+ 64
1118
+ ]
1119
+ },
1120
+ "model.layers.13.self_attn.k_proj": {
1121
+ "in_features": 2048,
1122
+ "out_features": 1024,
1123
+ "in_factors": [
1124
+ 32,
1125
+ 64
1126
+ ],
1127
+ "out_factors": [
1128
+ 32,
1129
+ 32
1130
+ ]
1131
+ },
1132
+ "model.layers.13.self_attn.v_proj": {
1133
+ "in_features": 2048,
1134
+ "out_features": 1024,
1135
+ "in_factors": [
1136
+ 32,
1137
+ 64
1138
+ ],
1139
+ "out_factors": [
1140
+ 32,
1141
+ 32
1142
+ ]
1143
+ },
1144
+ "model.layers.13.self_attn.o_proj": {
1145
+ "in_features": 2048,
1146
+ "out_features": 2048,
1147
+ "in_factors": [
1148
+ 32,
1149
+ 64
1150
+ ],
1151
+ "out_factors": [
1152
+ 32,
1153
+ 64
1154
+ ]
1155
+ },
1156
+ "model.layers.13.mlp.gate_proj": {
1157
+ "in_features": 2048,
1158
+ "out_features": 6144,
1159
+ "in_factors": [
1160
+ 32,
1161
+ 64
1162
+ ],
1163
+ "out_factors": [
1164
+ 64,
1165
+ 96
1166
+ ]
1167
+ },
1168
+ "model.layers.13.mlp.up_proj": {
1169
+ "in_features": 2048,
1170
+ "out_features": 6144,
1171
+ "in_factors": [
1172
+ 32,
1173
+ 64
1174
+ ],
1175
+ "out_factors": [
1176
+ 64,
1177
+ 96
1178
+ ]
1179
+ },
1180
+ "model.layers.13.mlp.down_proj": {
1181
+ "in_features": 6144,
1182
+ "out_features": 2048,
1183
+ "in_factors": [
1184
+ 64,
1185
+ 96
1186
+ ],
1187
+ "out_factors": [
1188
+ 32,
1189
+ 64
1190
+ ]
1191
+ },
1192
+ "model.layers.14.self_attn.q_proj": {
1193
+ "in_features": 2048,
1194
+ "out_features": 2048,
1195
+ "in_factors": [
1196
+ 32,
1197
+ 64
1198
+ ],
1199
+ "out_factors": [
1200
+ 32,
1201
+ 64
1202
+ ]
1203
+ },
1204
+ "model.layers.14.self_attn.k_proj": {
1205
+ "in_features": 2048,
1206
+ "out_features": 1024,
1207
+ "in_factors": [
1208
+ 32,
1209
+ 64
1210
+ ],
1211
+ "out_factors": [
1212
+ 32,
1213
+ 32
1214
+ ]
1215
+ },
1216
+ "model.layers.14.self_attn.v_proj": {
1217
+ "in_features": 2048,
1218
+ "out_features": 1024,
1219
+ "in_factors": [
1220
+ 32,
1221
+ 64
1222
+ ],
1223
+ "out_factors": [
1224
+ 32,
1225
+ 32
1226
+ ]
1227
+ },
1228
+ "model.layers.14.self_attn.o_proj": {
1229
+ "in_features": 2048,
1230
+ "out_features": 2048,
1231
+ "in_factors": [
1232
+ 32,
1233
+ 64
1234
+ ],
1235
+ "out_factors": [
1236
+ 32,
1237
+ 64
1238
+ ]
1239
+ },
1240
+ "model.layers.14.mlp.gate_proj": {
1241
+ "in_features": 2048,
1242
+ "out_features": 6144,
1243
+ "in_factors": [
1244
+ 32,
1245
+ 64
1246
+ ],
1247
+ "out_factors": [
1248
+ 64,
1249
+ 96
1250
+ ]
1251
+ },
1252
+ "model.layers.14.mlp.up_proj": {
1253
+ "in_features": 2048,
1254
+ "out_features": 6144,
1255
+ "in_factors": [
1256
+ 32,
1257
+ 64
1258
+ ],
1259
+ "out_factors": [
1260
+ 64,
1261
+ 96
1262
+ ]
1263
+ },
1264
+ "model.layers.14.mlp.down_proj": {
1265
+ "in_features": 6144,
1266
+ "out_features": 2048,
1267
+ "in_factors": [
1268
+ 64,
1269
+ 96
1270
+ ],
1271
+ "out_factors": [
1272
+ 32,
1273
+ 64
1274
+ ]
1275
+ },
1276
+ "model.layers.15.self_attn.q_proj": {
1277
+ "in_features": 2048,
1278
+ "out_features": 2048,
1279
+ "in_factors": [
1280
+ 32,
1281
+ 64
1282
+ ],
1283
+ "out_factors": [
1284
+ 32,
1285
+ 64
1286
+ ]
1287
+ },
1288
+ "model.layers.15.self_attn.k_proj": {
1289
+ "in_features": 2048,
1290
+ "out_features": 1024,
1291
+ "in_factors": [
1292
+ 32,
1293
+ 64
1294
+ ],
1295
+ "out_factors": [
1296
+ 32,
1297
+ 32
1298
+ ]
1299
+ },
1300
+ "model.layers.15.self_attn.v_proj": {
1301
+ "in_features": 2048,
1302
+ "out_features": 1024,
1303
+ "in_factors": [
1304
+ 32,
1305
+ 64
1306
+ ],
1307
+ "out_factors": [
1308
+ 32,
1309
+ 32
1310
+ ]
1311
+ },
1312
+ "model.layers.15.self_attn.o_proj": {
1313
+ "in_features": 2048,
1314
+ "out_features": 2048,
1315
+ "in_factors": [
1316
+ 32,
1317
+ 64
1318
+ ],
1319
+ "out_factors": [
1320
+ 32,
1321
+ 64
1322
+ ]
1323
+ },
1324
+ "model.layers.15.mlp.gate_proj": {
1325
+ "in_features": 2048,
1326
+ "out_features": 6144,
1327
+ "in_factors": [
1328
+ 32,
1329
+ 64
1330
+ ],
1331
+ "out_factors": [
1332
+ 64,
1333
+ 96
1334
+ ]
1335
+ },
1336
+ "model.layers.15.mlp.up_proj": {
1337
+ "in_features": 2048,
1338
+ "out_features": 6144,
1339
+ "in_factors": [
1340
+ 32,
1341
+ 64
1342
+ ],
1343
+ "out_factors": [
1344
+ 64,
1345
+ 96
1346
+ ]
1347
+ },
1348
+ "model.layers.15.mlp.down_proj": {
1349
+ "in_features": 6144,
1350
+ "out_features": 2048,
1351
+ "in_factors": [
1352
+ 64,
1353
+ 96
1354
+ ],
1355
+ "out_factors": [
1356
+ 32,
1357
+ 64
1358
+ ]
1359
+ },
1360
+ "model.layers.16.self_attn.q_proj": {
1361
+ "in_features": 2048,
1362
+ "out_features": 2048,
1363
+ "in_factors": [
1364
+ 32,
1365
+ 64
1366
+ ],
1367
+ "out_factors": [
1368
+ 32,
1369
+ 64
1370
+ ]
1371
+ },
1372
+ "model.layers.16.self_attn.k_proj": {
1373
+ "in_features": 2048,
1374
+ "out_features": 1024,
1375
+ "in_factors": [
1376
+ 32,
1377
+ 64
1378
+ ],
1379
+ "out_factors": [
1380
+ 32,
1381
+ 32
1382
+ ]
1383
+ },
1384
+ "model.layers.16.self_attn.v_proj": {
1385
+ "in_features": 2048,
1386
+ "out_features": 1024,
1387
+ "in_factors": [
1388
+ 32,
1389
+ 64
1390
+ ],
1391
+ "out_factors": [
1392
+ 32,
1393
+ 32
1394
+ ]
1395
+ },
1396
+ "model.layers.16.self_attn.o_proj": {
1397
+ "in_features": 2048,
1398
+ "out_features": 2048,
1399
+ "in_factors": [
1400
+ 32,
1401
+ 64
1402
+ ],
1403
+ "out_factors": [
1404
+ 32,
1405
+ 64
1406
+ ]
1407
+ },
1408
+ "model.layers.16.mlp.gate_proj": {
1409
+ "in_features": 2048,
1410
+ "out_features": 6144,
1411
+ "in_factors": [
1412
+ 32,
1413
+ 64
1414
+ ],
1415
+ "out_factors": [
1416
+ 64,
1417
+ 96
1418
+ ]
1419
+ },
1420
+ "model.layers.16.mlp.up_proj": {
1421
+ "in_features": 2048,
1422
+ "out_features": 6144,
1423
+ "in_factors": [
1424
+ 32,
1425
+ 64
1426
+ ],
1427
+ "out_factors": [
1428
+ 64,
1429
+ 96
1430
+ ]
1431
+ },
1432
+ "model.layers.16.mlp.down_proj": {
1433
+ "in_features": 6144,
1434
+ "out_features": 2048,
1435
+ "in_factors": [
1436
+ 64,
1437
+ 96
1438
+ ],
1439
+ "out_factors": [
1440
+ 32,
1441
+ 64
1442
+ ]
1443
+ },
1444
+ "model.layers.17.self_attn.q_proj": {
1445
+ "in_features": 2048,
1446
+ "out_features": 2048,
1447
+ "in_factors": [
1448
+ 32,
1449
+ 64
1450
+ ],
1451
+ "out_factors": [
1452
+ 32,
1453
+ 64
1454
+ ]
1455
+ },
1456
+ "model.layers.17.self_attn.k_proj": {
1457
+ "in_features": 2048,
1458
+ "out_features": 1024,
1459
+ "in_factors": [
1460
+ 32,
1461
+ 64
1462
+ ],
1463
+ "out_factors": [
1464
+ 32,
1465
+ 32
1466
+ ]
1467
+ },
1468
+ "model.layers.17.self_attn.v_proj": {
1469
+ "in_features": 2048,
1470
+ "out_features": 1024,
1471
+ "in_factors": [
1472
+ 32,
1473
+ 64
1474
+ ],
1475
+ "out_factors": [
1476
+ 32,
1477
+ 32
1478
+ ]
1479
+ },
1480
+ "model.layers.17.self_attn.o_proj": {
1481
+ "in_features": 2048,
1482
+ "out_features": 2048,
1483
+ "in_factors": [
1484
+ 32,
1485
+ 64
1486
+ ],
1487
+ "out_factors": [
1488
+ 32,
1489
+ 64
1490
+ ]
1491
+ },
1492
+ "model.layers.17.mlp.gate_proj": {
1493
+ "in_features": 2048,
1494
+ "out_features": 6144,
1495
+ "in_factors": [
1496
+ 32,
1497
+ 64
1498
+ ],
1499
+ "out_factors": [
1500
+ 64,
1501
+ 96
1502
+ ]
1503
+ },
1504
+ "model.layers.17.mlp.up_proj": {
1505
+ "in_features": 2048,
1506
+ "out_features": 6144,
1507
+ "in_factors": [
1508
+ 32,
1509
+ 64
1510
+ ],
1511
+ "out_factors": [
1512
+ 64,
1513
+ 96
1514
+ ]
1515
+ },
1516
+ "model.layers.17.mlp.down_proj": {
1517
+ "in_features": 6144,
1518
+ "out_features": 2048,
1519
+ "in_factors": [
1520
+ 64,
1521
+ 96
1522
+ ],
1523
+ "out_factors": [
1524
+ 32,
1525
+ 64
1526
+ ]
1527
+ },
1528
+ "model.layers.18.self_attn.q_proj": {
1529
+ "in_features": 2048,
1530
+ "out_features": 2048,
1531
+ "in_factors": [
1532
+ 32,
1533
+ 64
1534
+ ],
1535
+ "out_factors": [
1536
+ 32,
1537
+ 64
1538
+ ]
1539
+ },
1540
+ "model.layers.18.self_attn.k_proj": {
1541
+ "in_features": 2048,
1542
+ "out_features": 1024,
1543
+ "in_factors": [
1544
+ 32,
1545
+ 64
1546
+ ],
1547
+ "out_factors": [
1548
+ 32,
1549
+ 32
1550
+ ]
1551
+ },
1552
+ "model.layers.18.self_attn.v_proj": {
1553
+ "in_features": 2048,
1554
+ "out_features": 1024,
1555
+ "in_factors": [
1556
+ 32,
1557
+ 64
1558
+ ],
1559
+ "out_factors": [
1560
+ 32,
1561
+ 32
1562
+ ]
1563
+ },
1564
+ "model.layers.18.self_attn.o_proj": {
1565
+ "in_features": 2048,
1566
+ "out_features": 2048,
1567
+ "in_factors": [
1568
+ 32,
1569
+ 64
1570
+ ],
1571
+ "out_factors": [
1572
+ 32,
1573
+ 64
1574
+ ]
1575
+ },
1576
+ "model.layers.18.mlp.gate_proj": {
1577
+ "in_features": 2048,
1578
+ "out_features": 6144,
1579
+ "in_factors": [
1580
+ 32,
1581
+ 64
1582
+ ],
1583
+ "out_factors": [
1584
+ 64,
1585
+ 96
1586
+ ]
1587
+ },
1588
+ "model.layers.18.mlp.up_proj": {
1589
+ "in_features": 2048,
1590
+ "out_features": 6144,
1591
+ "in_factors": [
1592
+ 32,
1593
+ 64
1594
+ ],
1595
+ "out_factors": [
1596
+ 64,
1597
+ 96
1598
+ ]
1599
+ },
1600
+ "model.layers.18.mlp.down_proj": {
1601
+ "in_features": 6144,
1602
+ "out_features": 2048,
1603
+ "in_factors": [
1604
+ 64,
1605
+ 96
1606
+ ],
1607
+ "out_factors": [
1608
+ 32,
1609
+ 64
1610
+ ]
1611
+ },
1612
+ "model.layers.19.self_attn.q_proj": {
1613
+ "in_features": 2048,
1614
+ "out_features": 2048,
1615
+ "in_factors": [
1616
+ 32,
1617
+ 64
1618
+ ],
1619
+ "out_factors": [
1620
+ 32,
1621
+ 64
1622
+ ]
1623
+ },
1624
+ "model.layers.19.self_attn.k_proj": {
1625
+ "in_features": 2048,
1626
+ "out_features": 1024,
1627
+ "in_factors": [
1628
+ 32,
1629
+ 64
1630
+ ],
1631
+ "out_factors": [
1632
+ 32,
1633
+ 32
1634
+ ]
1635
+ },
1636
+ "model.layers.19.self_attn.v_proj": {
1637
+ "in_features": 2048,
1638
+ "out_features": 1024,
1639
+ "in_factors": [
1640
+ 32,
1641
+ 64
1642
+ ],
1643
+ "out_factors": [
1644
+ 32,
1645
+ 32
1646
+ ]
1647
+ },
1648
+ "model.layers.19.self_attn.o_proj": {
1649
+ "in_features": 2048,
1650
+ "out_features": 2048,
1651
+ "in_factors": [
1652
+ 32,
1653
+ 64
1654
+ ],
1655
+ "out_factors": [
1656
+ 32,
1657
+ 64
1658
+ ]
1659
+ },
1660
+ "model.layers.19.mlp.gate_proj": {
1661
+ "in_features": 2048,
1662
+ "out_features": 6144,
1663
+ "in_factors": [
1664
+ 32,
1665
+ 64
1666
+ ],
1667
+ "out_factors": [
1668
+ 64,
1669
+ 96
1670
+ ]
1671
+ },
1672
+ "model.layers.19.mlp.up_proj": {
1673
+ "in_features": 2048,
1674
+ "out_features": 6144,
1675
+ "in_factors": [
1676
+ 32,
1677
+ 64
1678
+ ],
1679
+ "out_factors": [
1680
+ 64,
1681
+ 96
1682
+ ]
1683
+ },
1684
+ "model.layers.19.mlp.down_proj": {
1685
+ "in_features": 6144,
1686
+ "out_features": 2048,
1687
+ "in_factors": [
1688
+ 64,
1689
+ 96
1690
+ ],
1691
+ "out_factors": [
1692
+ 32,
1693
+ 64
1694
+ ]
1695
+ },
1696
+ "model.layers.20.self_attn.q_proj": {
1697
+ "in_features": 2048,
1698
+ "out_features": 2048,
1699
+ "in_factors": [
1700
+ 32,
1701
+ 64
1702
+ ],
1703
+ "out_factors": [
1704
+ 32,
1705
+ 64
1706
+ ]
1707
+ },
1708
+ "model.layers.20.self_attn.k_proj": {
1709
+ "in_features": 2048,
1710
+ "out_features": 1024,
1711
+ "in_factors": [
1712
+ 32,
1713
+ 64
1714
+ ],
1715
+ "out_factors": [
1716
+ 32,
1717
+ 32
1718
+ ]
1719
+ },
1720
+ "model.layers.20.self_attn.v_proj": {
1721
+ "in_features": 2048,
1722
+ "out_features": 1024,
1723
+ "in_factors": [
1724
+ 32,
1725
+ 64
1726
+ ],
1727
+ "out_factors": [
1728
+ 32,
1729
+ 32
1730
+ ]
1731
+ },
1732
+ "model.layers.20.self_attn.o_proj": {
1733
+ "in_features": 2048,
1734
+ "out_features": 2048,
1735
+ "in_factors": [
1736
+ 32,
1737
+ 64
1738
+ ],
1739
+ "out_factors": [
1740
+ 32,
1741
+ 64
1742
+ ]
1743
+ },
1744
+ "model.layers.20.mlp.gate_proj": {
1745
+ "in_features": 2048,
1746
+ "out_features": 6144,
1747
+ "in_factors": [
1748
+ 32,
1749
+ 64
1750
+ ],
1751
+ "out_factors": [
1752
+ 64,
1753
+ 96
1754
+ ]
1755
+ },
1756
+ "model.layers.20.mlp.up_proj": {
1757
+ "in_features": 2048,
1758
+ "out_features": 6144,
1759
+ "in_factors": [
1760
+ 32,
1761
+ 64
1762
+ ],
1763
+ "out_factors": [
1764
+ 64,
1765
+ 96
1766
+ ]
1767
+ },
1768
+ "model.layers.20.mlp.down_proj": {
1769
+ "in_features": 6144,
1770
+ "out_features": 2048,
1771
+ "in_factors": [
1772
+ 64,
1773
+ 96
1774
+ ],
1775
+ "out_factors": [
1776
+ 32,
1777
+ 64
1778
+ ]
1779
+ },
1780
+ "model.layers.21.self_attn.q_proj": {
1781
+ "in_features": 2048,
1782
+ "out_features": 2048,
1783
+ "in_factors": [
1784
+ 32,
1785
+ 64
1786
+ ],
1787
+ "out_factors": [
1788
+ 32,
1789
+ 64
1790
+ ]
1791
+ },
1792
+ "model.layers.21.self_attn.k_proj": {
1793
+ "in_features": 2048,
1794
+ "out_features": 1024,
1795
+ "in_factors": [
1796
+ 32,
1797
+ 64
1798
+ ],
1799
+ "out_factors": [
1800
+ 32,
1801
+ 32
1802
+ ]
1803
+ },
1804
+ "model.layers.21.self_attn.v_proj": {
1805
+ "in_features": 2048,
1806
+ "out_features": 1024,
1807
+ "in_factors": [
1808
+ 32,
1809
+ 64
1810
+ ],
1811
+ "out_factors": [
1812
+ 32,
1813
+ 32
1814
+ ]
1815
+ },
1816
+ "model.layers.21.self_attn.o_proj": {
1817
+ "in_features": 2048,
1818
+ "out_features": 2048,
1819
+ "in_factors": [
1820
+ 32,
1821
+ 64
1822
+ ],
1823
+ "out_factors": [
1824
+ 32,
1825
+ 64
1826
+ ]
1827
+ },
1828
+ "model.layers.21.mlp.gate_proj": {
1829
+ "in_features": 2048,
1830
+ "out_features": 6144,
1831
+ "in_factors": [
1832
+ 32,
1833
+ 64
1834
+ ],
1835
+ "out_factors": [
1836
+ 64,
1837
+ 96
1838
+ ]
1839
+ },
1840
+ "model.layers.21.mlp.up_proj": {
1841
+ "in_features": 2048,
1842
+ "out_features": 6144,
1843
+ "in_factors": [
1844
+ 32,
1845
+ 64
1846
+ ],
1847
+ "out_factors": [
1848
+ 64,
1849
+ 96
1850
+ ]
1851
+ },
1852
+ "model.layers.21.mlp.down_proj": {
1853
+ "in_features": 6144,
1854
+ "out_features": 2048,
1855
+ "in_factors": [
1856
+ 64,
1857
+ 96
1858
+ ],
1859
+ "out_factors": [
1860
+ 32,
1861
+ 64
1862
+ ]
1863
+ },
1864
+ "model.layers.22.self_attn.q_proj": {
1865
+ "in_features": 2048,
1866
+ "out_features": 2048,
1867
+ "in_factors": [
1868
+ 32,
1869
+ 64
1870
+ ],
1871
+ "out_factors": [
1872
+ 32,
1873
+ 64
1874
+ ]
1875
+ },
1876
+ "model.layers.22.self_attn.k_proj": {
1877
+ "in_features": 2048,
1878
+ "out_features": 1024,
1879
+ "in_factors": [
1880
+ 32,
1881
+ 64
1882
+ ],
1883
+ "out_factors": [
1884
+ 32,
1885
+ 32
1886
+ ]
1887
+ },
1888
+ "model.layers.22.self_attn.v_proj": {
1889
+ "in_features": 2048,
1890
+ "out_features": 1024,
1891
+ "in_factors": [
1892
+ 32,
1893
+ 64
1894
+ ],
1895
+ "out_factors": [
1896
+ 32,
1897
+ 32
1898
+ ]
1899
+ },
1900
+ "model.layers.22.self_attn.o_proj": {
1901
+ "in_features": 2048,
1902
+ "out_features": 2048,
1903
+ "in_factors": [
1904
+ 32,
1905
+ 64
1906
+ ],
1907
+ "out_factors": [
1908
+ 32,
1909
+ 64
1910
+ ]
1911
+ },
1912
+ "model.layers.22.mlp.gate_proj": {
1913
+ "in_features": 2048,
1914
+ "out_features": 6144,
1915
+ "in_factors": [
1916
+ 32,
1917
+ 64
1918
+ ],
1919
+ "out_factors": [
1920
+ 64,
1921
+ 96
1922
+ ]
1923
+ },
1924
+ "model.layers.22.mlp.up_proj": {
1925
+ "in_features": 2048,
1926
+ "out_features": 6144,
1927
+ "in_factors": [
1928
+ 32,
1929
+ 64
1930
+ ],
1931
+ "out_factors": [
1932
+ 64,
1933
+ 96
1934
+ ]
1935
+ },
1936
+ "model.layers.22.mlp.down_proj": {
1937
+ "in_features": 6144,
1938
+ "out_features": 2048,
1939
+ "in_factors": [
1940
+ 64,
1941
+ 96
1942
+ ],
1943
+ "out_factors": [
1944
+ 32,
1945
+ 64
1946
+ ]
1947
+ },
1948
+ "model.layers.23.self_attn.q_proj": {
1949
+ "in_features": 2048,
1950
+ "out_features": 2048,
1951
+ "in_factors": [
1952
+ 32,
1953
+ 64
1954
+ ],
1955
+ "out_factors": [
1956
+ 32,
1957
+ 64
1958
+ ]
1959
+ },
1960
+ "model.layers.23.self_attn.k_proj": {
1961
+ "in_features": 2048,
1962
+ "out_features": 1024,
1963
+ "in_factors": [
1964
+ 32,
1965
+ 64
1966
+ ],
1967
+ "out_factors": [
1968
+ 32,
1969
+ 32
1970
+ ]
1971
+ },
1972
+ "model.layers.23.self_attn.v_proj": {
1973
+ "in_features": 2048,
1974
+ "out_features": 1024,
1975
+ "in_factors": [
1976
+ 32,
1977
+ 64
1978
+ ],
1979
+ "out_factors": [
1980
+ 32,
1981
+ 32
1982
+ ]
1983
+ },
1984
+ "model.layers.23.self_attn.o_proj": {
1985
+ "in_features": 2048,
1986
+ "out_features": 2048,
1987
+ "in_factors": [
1988
+ 32,
1989
+ 64
1990
+ ],
1991
+ "out_factors": [
1992
+ 32,
1993
+ 64
1994
+ ]
1995
+ },
1996
+ "model.layers.23.mlp.gate_proj": {
1997
+ "in_features": 2048,
1998
+ "out_features": 6144,
1999
+ "in_factors": [
2000
+ 32,
2001
+ 64
2002
+ ],
2003
+ "out_factors": [
2004
+ 64,
2005
+ 96
2006
+ ]
2007
+ },
2008
+ "model.layers.23.mlp.up_proj": {
2009
+ "in_features": 2048,
2010
+ "out_features": 6144,
2011
+ "in_factors": [
2012
+ 32,
2013
+ 64
2014
+ ],
2015
+ "out_factors": [
2016
+ 64,
2017
+ 96
2018
+ ]
2019
+ },
2020
+ "model.layers.23.mlp.down_proj": {
2021
+ "in_features": 6144,
2022
+ "out_features": 2048,
2023
+ "in_factors": [
2024
+ 64,
2025
+ 96
2026
+ ],
2027
+ "out_factors": [
2028
+ 32,
2029
+ 64
2030
+ ]
2031
+ },
2032
+ "model.layers.24.self_attn.q_proj": {
2033
+ "in_features": 2048,
2034
+ "out_features": 2048,
2035
+ "in_factors": [
2036
+ 32,
2037
+ 64
2038
+ ],
2039
+ "out_factors": [
2040
+ 32,
2041
+ 64
2042
+ ]
2043
+ },
2044
+ "model.layers.24.self_attn.k_proj": {
2045
+ "in_features": 2048,
2046
+ "out_features": 1024,
2047
+ "in_factors": [
2048
+ 32,
2049
+ 64
2050
+ ],
2051
+ "out_factors": [
2052
+ 32,
2053
+ 32
2054
+ ]
2055
+ },
2056
+ "model.layers.24.self_attn.v_proj": {
2057
+ "in_features": 2048,
2058
+ "out_features": 1024,
2059
+ "in_factors": [
2060
+ 32,
2061
+ 64
2062
+ ],
2063
+ "out_factors": [
2064
+ 32,
2065
+ 32
2066
+ ]
2067
+ },
2068
+ "model.layers.24.self_attn.o_proj": {
2069
+ "in_features": 2048,
2070
+ "out_features": 2048,
2071
+ "in_factors": [
2072
+ 32,
2073
+ 64
2074
+ ],
2075
+ "out_factors": [
2076
+ 32,
2077
+ 64
2078
+ ]
2079
+ },
2080
+ "model.layers.24.mlp.gate_proj": {
2081
+ "in_features": 2048,
2082
+ "out_features": 6144,
2083
+ "in_factors": [
2084
+ 32,
2085
+ 64
2086
+ ],
2087
+ "out_factors": [
2088
+ 64,
2089
+ 96
2090
+ ]
2091
+ },
2092
+ "model.layers.24.mlp.up_proj": {
2093
+ "in_features": 2048,
2094
+ "out_features": 6144,
2095
+ "in_factors": [
2096
+ 32,
2097
+ 64
2098
+ ],
2099
+ "out_factors": [
2100
+ 64,
2101
+ 96
2102
+ ]
2103
+ },
2104
+ "model.layers.24.mlp.down_proj": {
2105
+ "in_features": 6144,
2106
+ "out_features": 2048,
2107
+ "in_factors": [
2108
+ 64,
2109
+ 96
2110
+ ],
2111
+ "out_factors": [
2112
+ 32,
2113
+ 64
2114
+ ]
2115
+ },
2116
+ "model.layers.25.self_attn.q_proj": {
2117
+ "in_features": 2048,
2118
+ "out_features": 2048,
2119
+ "in_factors": [
2120
+ 32,
2121
+ 64
2122
+ ],
2123
+ "out_factors": [
2124
+ 32,
2125
+ 64
2126
+ ]
2127
+ },
2128
+ "model.layers.25.self_attn.k_proj": {
2129
+ "in_features": 2048,
2130
+ "out_features": 1024,
2131
+ "in_factors": [
2132
+ 32,
2133
+ 64
2134
+ ],
2135
+ "out_factors": [
2136
+ 32,
2137
+ 32
2138
+ ]
2139
+ },
2140
+ "model.layers.25.self_attn.v_proj": {
2141
+ "in_features": 2048,
2142
+ "out_features": 1024,
2143
+ "in_factors": [
2144
+ 32,
2145
+ 64
2146
+ ],
2147
+ "out_factors": [
2148
+ 32,
2149
+ 32
2150
+ ]
2151
+ },
2152
+ "model.layers.25.self_attn.o_proj": {
2153
+ "in_features": 2048,
2154
+ "out_features": 2048,
2155
+ "in_factors": [
2156
+ 32,
2157
+ 64
2158
+ ],
2159
+ "out_factors": [
2160
+ 32,
2161
+ 64
2162
+ ]
2163
+ },
2164
+ "model.layers.25.mlp.gate_proj": {
2165
+ "in_features": 2048,
2166
+ "out_features": 6144,
2167
+ "in_factors": [
2168
+ 32,
2169
+ 64
2170
+ ],
2171
+ "out_factors": [
2172
+ 64,
2173
+ 96
2174
+ ]
2175
+ },
2176
+ "model.layers.25.mlp.up_proj": {
2177
+ "in_features": 2048,
2178
+ "out_features": 6144,
2179
+ "in_factors": [
2180
+ 32,
2181
+ 64
2182
+ ],
2183
+ "out_factors": [
2184
+ 64,
2185
+ 96
2186
+ ]
2187
+ },
2188
+ "model.layers.25.mlp.down_proj": {
2189
+ "in_features": 6144,
2190
+ "out_features": 2048,
2191
+ "in_factors": [
2192
+ 64,
2193
+ 96
2194
+ ],
2195
+ "out_factors": [
2196
+ 32,
2197
+ 64
2198
+ ]
2199
+ },
2200
+ "model.layers.26.self_attn.q_proj": {
2201
+ "in_features": 2048,
2202
+ "out_features": 2048,
2203
+ "in_factors": [
2204
+ 32,
2205
+ 64
2206
+ ],
2207
+ "out_factors": [
2208
+ 32,
2209
+ 64
2210
+ ]
2211
+ },
2212
+ "model.layers.26.self_attn.k_proj": {
2213
+ "in_features": 2048,
2214
+ "out_features": 1024,
2215
+ "in_factors": [
2216
+ 32,
2217
+ 64
2218
+ ],
2219
+ "out_factors": [
2220
+ 32,
2221
+ 32
2222
+ ]
2223
+ },
2224
+ "model.layers.26.self_attn.v_proj": {
2225
+ "in_features": 2048,
2226
+ "out_features": 1024,
2227
+ "in_factors": [
2228
+ 32,
2229
+ 64
2230
+ ],
2231
+ "out_factors": [
2232
+ 32,
2233
+ 32
2234
+ ]
2235
+ },
2236
+ "model.layers.26.self_attn.o_proj": {
2237
+ "in_features": 2048,
2238
+ "out_features": 2048,
2239
+ "in_factors": [
2240
+ 32,
2241
+ 64
2242
+ ],
2243
+ "out_factors": [
2244
+ 32,
2245
+ 64
2246
+ ]
2247
+ },
2248
+ "model.layers.26.mlp.gate_proj": {
2249
+ "in_features": 2048,
2250
+ "out_features": 6144,
2251
+ "in_factors": [
2252
+ 32,
2253
+ 64
2254
+ ],
2255
+ "out_factors": [
2256
+ 64,
2257
+ 96
2258
+ ]
2259
+ },
2260
+ "model.layers.26.mlp.up_proj": {
2261
+ "in_features": 2048,
2262
+ "out_features": 6144,
2263
+ "in_factors": [
2264
+ 32,
2265
+ 64
2266
+ ],
2267
+ "out_factors": [
2268
+ 64,
2269
+ 96
2270
+ ]
2271
+ },
2272
+ "model.layers.26.mlp.down_proj": {
2273
+ "in_features": 6144,
2274
+ "out_features": 2048,
2275
+ "in_factors": [
2276
+ 64,
2277
+ 96
2278
+ ],
2279
+ "out_factors": [
2280
+ 32,
2281
+ 64
2282
+ ]
2283
+ },
2284
+ "model.layers.27.self_attn.q_proj": {
2285
+ "in_features": 2048,
2286
+ "out_features": 2048,
2287
+ "in_factors": [
2288
+ 32,
2289
+ 64
2290
+ ],
2291
+ "out_factors": [
2292
+ 32,
2293
+ 64
2294
+ ]
2295
+ },
2296
+ "model.layers.27.self_attn.k_proj": {
2297
+ "in_features": 2048,
2298
+ "out_features": 1024,
2299
+ "in_factors": [
2300
+ 32,
2301
+ 64
2302
+ ],
2303
+ "out_factors": [
2304
+ 32,
2305
+ 32
2306
+ ]
2307
+ },
2308
+ "model.layers.27.self_attn.v_proj": {
2309
+ "in_features": 2048,
2310
+ "out_features": 1024,
2311
+ "in_factors": [
2312
+ 32,
2313
+ 64
2314
+ ],
2315
+ "out_factors": [
2316
+ 32,
2317
+ 32
2318
+ ]
2319
+ },
2320
+ "model.layers.27.self_attn.o_proj": {
2321
+ "in_features": 2048,
2322
+ "out_features": 2048,
2323
+ "in_factors": [
2324
+ 32,
2325
+ 64
2326
+ ],
2327
+ "out_factors": [
2328
+ 32,
2329
+ 64
2330
+ ]
2331
+ },
2332
+ "model.layers.27.mlp.gate_proj": {
2333
+ "in_features": 2048,
2334
+ "out_features": 6144,
2335
+ "in_factors": [
2336
+ 32,
2337
+ 64
2338
+ ],
2339
+ "out_factors": [
2340
+ 64,
2341
+ 96
2342
+ ]
2343
+ },
2344
+ "model.layers.27.mlp.up_proj": {
2345
+ "in_features": 2048,
2346
+ "out_features": 6144,
2347
+ "in_factors": [
2348
+ 32,
2349
+ 64
2350
+ ],
2351
+ "out_factors": [
2352
+ 64,
2353
+ 96
2354
+ ]
2355
+ },
2356
+ "model.layers.27.mlp.down_proj": {
2357
+ "in_features": 6144,
2358
+ "out_features": 2048,
2359
+ "in_factors": [
2360
+ 64,
2361
+ 96
2362
+ ],
2363
+ "out_factors": [
2364
+ 32,
2365
+ 64
2366
+ ]
2367
+ }
2368
+ },
2369
+ "best_epoch": 2,
2370
+ "early_stopped": false,
2371
+ "best_val_loss": 0.12033694753423334
2372
+ }
pytorch_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:afe925c3e0de1216e7362dbeff59cc876498c754045f4d3bd4cca567b28c11a6
3
+ size 6887279983
special_tokens_map.json ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "additional_special_tokens": [
3
+ "<|im_start|>",
4
+ "<|im_end|>",
5
+ "<|object_ref_start|>",
6
+ "<|object_ref_end|>",
7
+ "<|box_start|>",
8
+ "<|box_end|>",
9
+ "<|quad_start|>",
10
+ "<|quad_end|>",
11
+ "<|vision_start|>",
12
+ "<|vision_end|>",
13
+ "<|vision_pad|>",
14
+ "<|image_pad|>",
15
+ "<|video_pad|>"
16
+ ],
17
+ "eos_token": {
18
+ "content": "<|im_end|>",
19
+ "lstrip": false,
20
+ "normalized": false,
21
+ "rstrip": false,
22
+ "single_word": false
23
+ },
24
+ "pad_token": {
25
+ "content": "<|endoftext|>",
26
+ "lstrip": false,
27
+ "normalized": false,
28
+ "rstrip": false,
29
+ "single_word": false
30
+ }
31
+ }
tokenizer.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a224a732c0c9a3eadea504a5629233b88761c3105d1f1b4a60161847a0709c32
3
+ size 11422753
tokenizer_config.json ADDED
@@ -0,0 +1,240 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_bos_token": false,
3
+ "add_prefix_space": false,
4
+ "added_tokens_decoder": {
5
+ "151643": {
6
+ "content": "<|endoftext|>",
7
+ "lstrip": false,
8
+ "normalized": false,
9
+ "rstrip": false,
10
+ "single_word": false,
11
+ "special": true
12
+ },
13
+ "151644": {
14
+ "content": "<|im_start|>",
15
+ "lstrip": false,
16
+ "normalized": false,
17
+ "rstrip": false,
18
+ "single_word": false,
19
+ "special": true
20
+ },
21
+ "151645": {
22
+ "content": "<|im_end|>",
23
+ "lstrip": false,
24
+ "normalized": false,
25
+ "rstrip": false,
26
+ "single_word": false,
27
+ "special": true
28
+ },
29
+ "151646": {
30
+ "content": "<|object_ref_start|>",
31
+ "lstrip": false,
32
+ "normalized": false,
33
+ "rstrip": false,
34
+ "single_word": false,
35
+ "special": true
36
+ },
37
+ "151647": {
38
+ "content": "<|object_ref_end|>",
39
+ "lstrip": false,
40
+ "normalized": false,
41
+ "rstrip": false,
42
+ "single_word": false,
43
+ "special": true
44
+ },
45
+ "151648": {
46
+ "content": "<|box_start|>",
47
+ "lstrip": false,
48
+ "normalized": false,
49
+ "rstrip": false,
50
+ "single_word": false,
51
+ "special": true
52
+ },
53
+ "151649": {
54
+ "content": "<|box_end|>",
55
+ "lstrip": false,
56
+ "normalized": false,
57
+ "rstrip": false,
58
+ "single_word": false,
59
+ "special": true
60
+ },
61
+ "151650": {
62
+ "content": "<|quad_start|>",
63
+ "lstrip": false,
64
+ "normalized": false,
65
+ "rstrip": false,
66
+ "single_word": false,
67
+ "special": true
68
+ },
69
+ "151651": {
70
+ "content": "<|quad_end|>",
71
+ "lstrip": false,
72
+ "normalized": false,
73
+ "rstrip": false,
74
+ "single_word": false,
75
+ "special": true
76
+ },
77
+ "151652": {
78
+ "content": "<|vision_start|>",
79
+ "lstrip": false,
80
+ "normalized": false,
81
+ "rstrip": false,
82
+ "single_word": false,
83
+ "special": true
84
+ },
85
+ "151653": {
86
+ "content": "<|vision_end|>",
87
+ "lstrip": false,
88
+ "normalized": false,
89
+ "rstrip": false,
90
+ "single_word": false,
91
+ "special": true
92
+ },
93
+ "151654": {
94
+ "content": "<|vision_pad|>",
95
+ "lstrip": false,
96
+ "normalized": false,
97
+ "rstrip": false,
98
+ "single_word": false,
99
+ "special": true
100
+ },
101
+ "151655": {
102
+ "content": "<|image_pad|>",
103
+ "lstrip": false,
104
+ "normalized": false,
105
+ "rstrip": false,
106
+ "single_word": false,
107
+ "special": true
108
+ },
109
+ "151656": {
110
+ "content": "<|video_pad|>",
111
+ "lstrip": false,
112
+ "normalized": false,
113
+ "rstrip": false,
114
+ "single_word": false,
115
+ "special": true
116
+ },
117
+ "151657": {
118
+ "content": "<tool_call>",
119
+ "lstrip": false,
120
+ "normalized": false,
121
+ "rstrip": false,
122
+ "single_word": false,
123
+ "special": false
124
+ },
125
+ "151658": {
126
+ "content": "</tool_call>",
127
+ "lstrip": false,
128
+ "normalized": false,
129
+ "rstrip": false,
130
+ "single_word": false,
131
+ "special": false
132
+ },
133
+ "151659": {
134
+ "content": "<|fim_prefix|>",
135
+ "lstrip": false,
136
+ "normalized": false,
137
+ "rstrip": false,
138
+ "single_word": false,
139
+ "special": false
140
+ },
141
+ "151660": {
142
+ "content": "<|fim_middle|>",
143
+ "lstrip": false,
144
+ "normalized": false,
145
+ "rstrip": false,
146
+ "single_word": false,
147
+ "special": false
148
+ },
149
+ "151661": {
150
+ "content": "<|fim_suffix|>",
151
+ "lstrip": false,
152
+ "normalized": false,
153
+ "rstrip": false,
154
+ "single_word": false,
155
+ "special": false
156
+ },
157
+ "151662": {
158
+ "content": "<|fim_pad|>",
159
+ "lstrip": false,
160
+ "normalized": false,
161
+ "rstrip": false,
162
+ "single_word": false,
163
+ "special": false
164
+ },
165
+ "151663": {
166
+ "content": "<|repo_name|>",
167
+ "lstrip": false,
168
+ "normalized": false,
169
+ "rstrip": false,
170
+ "single_word": false,
171
+ "special": false
172
+ },
173
+ "151664": {
174
+ "content": "<|file_sep|>",
175
+ "lstrip": false,
176
+ "normalized": false,
177
+ "rstrip": false,
178
+ "single_word": false,
179
+ "special": false
180
+ },
181
+ "151665": {
182
+ "content": "<tool_response>",
183
+ "lstrip": false,
184
+ "normalized": false,
185
+ "rstrip": false,
186
+ "single_word": false,
187
+ "special": false
188
+ },
189
+ "151666": {
190
+ "content": "</tool_response>",
191
+ "lstrip": false,
192
+ "normalized": false,
193
+ "rstrip": false,
194
+ "single_word": false,
195
+ "special": false
196
+ },
197
+ "151667": {
198
+ "content": "<think>",
199
+ "lstrip": false,
200
+ "normalized": false,
201
+ "rstrip": false,
202
+ "single_word": false,
203
+ "special": false
204
+ },
205
+ "151668": {
206
+ "content": "</think>",
207
+ "lstrip": false,
208
+ "normalized": false,
209
+ "rstrip": false,
210
+ "single_word": false,
211
+ "special": false
212
+ }
213
+ },
214
+ "additional_special_tokens": [
215
+ "<|im_start|>",
216
+ "<|im_end|>",
217
+ "<|object_ref_start|>",
218
+ "<|object_ref_end|>",
219
+ "<|box_start|>",
220
+ "<|box_end|>",
221
+ "<|quad_start|>",
222
+ "<|quad_end|>",
223
+ "<|vision_start|>",
224
+ "<|vision_end|>",
225
+ "<|vision_pad|>",
226
+ "<|image_pad|>",
227
+ "<|video_pad|>"
228
+ ],
229
+ "bos_token": null,
230
+ "chat_template": "{%- if tools %}\n {{- '<|im_start|>system\\n' }}\n {%- if messages[0].role == 'system' %}\n {{- messages[0].content + '\\n\\n' }}\n {%- endif %}\n {{- \"# Tools\\n\\nYou may call one or more functions to assist with the user query.\\n\\nYou are provided with function signatures within <tools></tools> XML tags:\\n<tools>\" }}\n {%- for tool in tools %}\n {{- \"\\n\" }}\n {{- tool | tojson }}\n {%- endfor %}\n {{- \"\\n</tools>\\n\\nFor each function call, return a json object with function name and arguments within <tool_call></tool_call> XML tags:\\n<tool_call>\\n{\\\"name\\\": <function-name>, \\\"arguments\\\": <args-json-object>}\\n</tool_call><|im_end|>\\n\" }}\n{%- else %}\n {%- if messages[0].role == 'system' %}\n {{- '<|im_start|>system\\n' + messages[0].content + '<|im_end|>\\n' }}\n {%- endif %}\n{%- endif %}\n{%- set ns = namespace(multi_step_tool=true, last_query_index=messages|length - 1) %}\n{%- for message in messages[::-1] %}\n {%- set index = (messages|length - 1) - loop.index0 %}\n {%- if ns.multi_step_tool and message.role == \"user\" and not(message.content.startswith('<tool_response>') and message.content.endswith('</tool_response>')) %}\n {%- set ns.multi_step_tool = false %}\n {%- set ns.last_query_index = index %}\n {%- endif %}\n{%- endfor %}\n{%- for message in messages %}\n {%- if (message.role == \"user\") or (message.role == \"system\" and not loop.first) %}\n {{- '<|im_start|>' + message.role + '\\n' + message.content + '<|im_end|>' + '\\n' }}\n {%- elif message.role == \"assistant\" %}\n {%- set content = message.content %}\n {%- set reasoning_content = '' %}\n {%- if message.reasoning_content is defined and message.reasoning_content is not none %}\n {%- set reasoning_content = message.reasoning_content %}\n {%- else %}\n {%- if '</think>' in message.content %}\n {%- set content = message.content.split('</think>')[-1].lstrip('\\n') %}\n {%- set reasoning_content = message.content.split('</think>')[0].rstrip('\\n').split('<think>')[-1].lstrip('\\n') %}\n {%- endif %}\n {%- endif %}\n {%- if loop.index0 > ns.last_query_index %}\n {%- if loop.last or (not loop.last and reasoning_content) %}\n {{- '<|im_start|>' + message.role + '\\n<think>\\n' + reasoning_content.strip('\\n') + '\\n</think>\\n\\n' + content.lstrip('\\n') }}\n {%- else %}\n {{- '<|im_start|>' + message.role + '\\n' + content }}\n {%- endif %}\n {%- else %}\n {{- '<|im_start|>' + message.role + '\\n' + content }}\n {%- endif %}\n {%- if message.tool_calls %}\n {%- for tool_call in message.tool_calls %}\n {%- if (loop.first and content) or (not loop.first) %}\n {{- '\\n' }}\n {%- endif %}\n {%- if tool_call.function %}\n {%- set tool_call = tool_call.function %}\n {%- endif %}\n {{- '<tool_call>\\n{\"name\": \"' }}\n {{- tool_call.name }}\n {{- '\", \"arguments\": ' }}\n {%- if tool_call.arguments is string %}\n {{- tool_call.arguments }}\n {%- else %}\n {{- tool_call.arguments | tojson }}\n {%- endif %}\n {{- '}\\n</tool_call>' }}\n {%- endfor %}\n {%- endif %}\n {{- '<|im_end|>\\n' }}\n {%- elif message.role == \"tool\" %}\n {%- if loop.first or (messages[loop.index0 - 1].role != \"tool\") %}\n {{- '<|im_start|>user' }}\n {%- endif %}\n {{- '\\n<tool_response>\\n' }}\n {{- message.content }}\n {{- '\\n</tool_response>' }}\n {%- if loop.last or (messages[loop.index0 + 1].role != \"tool\") %}\n {{- '<|im_end|>\\n' }}\n {%- endif %}\n {%- endif %}\n{%- endfor %}\n{%- if add_generation_prompt %}\n {{- '<|im_start|>assistant\\n' }}\n {%- if enable_thinking is defined and enable_thinking is false %}\n {{- '<think>\\n\\n</think>\\n\\n' }}\n {%- endif %}\n{%- endif %}",
231
+ "clean_up_tokenization_spaces": false,
232
+ "eos_token": "<|im_end|>",
233
+ "errors": "replace",
234
+ "extra_special_tokens": {},
235
+ "model_max_length": 131072,
236
+ "pad_token": "<|endoftext|>",
237
+ "split_special_tokens": false,
238
+ "tokenizer_class": "Qwen2Tokenizer",
239
+ "unk_token": null
240
+ }
vocab.json ADDED
The diff for this file is too large to render. See raw diff