Upload folder using huggingface_hub

#1
README.md ADDED
@@ -0,0 +1,85 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ thumbnail: "https://assets-global.website-files.com/646b351987a8d8ce158d1940/64ec9e96b4334c0e1ac41504_Logo%20with%20white%20text.svg"
3
+ base_model: THUDM/LongWriter-glm4-9b
4
+ metrics:
5
+ - memory_disk
6
+ - memory_inference
7
+ - inference_latency
8
+ - inference_throughput
9
+ - inference_CO2_emissions
10
+ - inference_energy_consumption
11
+ tags:
12
+ - pruna-ai
13
+ ---
14
+ <!-- header start -->
15
+ <!-- 200823 -->
16
+ <div style="width: auto; margin-left: auto; margin-right: auto">
17
+ <a href="https://www.pruna.ai/" target="_blank" rel="noopener noreferrer">
18
+ <img src="https://i.imgur.com/eDAlcgk.png" alt="PrunaAI" style="width: 100%; min-width: 400px; display: block; margin: auto;">
19
+ </a>
20
+ </div>
21
+ <!-- header end -->
22
+
23
+ [![Twitter](https://img.shields.io/twitter/follow/PrunaAI?style=social)](https://twitter.com/PrunaAI)
24
+ [![GitHub](https://img.shields.io/github/followers/PrunaAI?label=Follow%20%40PrunaAI&style=social)](https://github.com/PrunaAI)
25
+ [![LinkedIn](https://img.shields.io/badge/LinkedIn-Connect-blue)](https://www.linkedin.com/company/93832878/admin/feed/posts/?feedType=following)
26
+ [![Discord](https://img.shields.io/badge/Discord-Join%20Us-blue?style=social&logo=discord)](https://discord.gg/rskEr4BZJx)
27
+
28
+ # Simply make AI models cheaper, smaller, faster, and greener!
29
+
30
+ - Give a thumbs up if you like this model!
31
+ - Contact us and tell us which model to compress next [here](https://www.pruna.ai/contact).
32
+ - Request access to easily compress your *own* AI models [here](https://z0halsaff74.typeform.com/pruna-access?typeform-source=www.pruna.ai).
33
+ - Read the documentations to know more [here](https://pruna-ai-pruna.readthedocs-hosted.com/en/latest/)
34
+ - Join Pruna AI community on Discord [here](https://discord.gg/CP4VSgck) to share feedback/suggestions or get help.
35
+
36
+ ## Results
37
+
38
+ ![image info](./plots.png)
39
+
40
+ **Frequently Asked Questions**
41
+ - ***How does the compression work?*** The model is compressed with llm-int8.
42
+ - ***How does the model quality change?*** The quality of the model output might vary compared to the base model.
43
+ - ***How is the model efficiency evaluated?*** These results were obtained on HARDWARE_NAME with configuration described in `model/smash_config.json` and are obtained after a hardware warmup. The smashed model is directly compared to the original base model. Efficiency results may vary in other settings (e.g. other hardware, image size, batch size, ...). We recommend to directly run them in the use-case conditions to know if the smashed model can benefit you.
44
+ - ***What is the model format?*** We use safetensors.
45
+ - ***What calibration data has been used?*** If needed by the compression method, we used WikiText as the calibration data.
46
+ - ***What is the naming convention for Pruna Huggingface models?*** We take the original model name and append "turbo", "tiny", or "green" if the smashed model has a measured inference speed, inference memory, or inference energy consumption which is less than 90% of the original base model.
47
+ - ***How to compress my own models?*** You can request premium access to more compression methods and tech support for your specific use-cases [here](https://z0halsaff74.typeform.com/pruna-access?typeform-source=www.pruna.ai).
48
+ - ***What are "first" metrics?*** Results mentioning "first" are obtained after the first run of the model. The first run might take more memory or be slower than the subsequent runs due cuda overheads.
49
+ - ***What are "Sync" and "Async" metrics?*** "Sync" metrics are obtained by syncing all GPU processes and stop measurement when all of them are executed. "Async" metrics are obtained without syncing all GPU processes and stop when the model output can be used by the CPU. We provide both metrics since both could be relevant depending on the use-case. We recommend to test the efficiency gains directly in your use-cases.
50
+
51
+ ## Setup
52
+
53
+ You can run the smashed model with these steps:
54
+
55
+ 0. Check requirements from the original repo THUDM/LongWriter-glm4-9b installed. In particular, check python, cuda, and transformers versions.
56
+ 1. Make sure that you have installed quantization related packages.
57
+ ```bash
58
+ pip install transformers accelerate bitsandbytes>0.37.0
59
+ ```
60
+ 2. Load & run the model.
61
+ ```python
62
+ from transformers import AutoModelForCausalLM, AutoTokenizer
63
+
64
+
65
+ model = AutoModelForCausalLM.from_pretrained("PrunaAI/THUDM-LongWriter-glm4-9b-bnb-4bit-smashed", trust_remote_code=True, device_map='auto')
66
+ tokenizer = AutoTokenizer.from_pretrained("THUDM/LongWriter-glm4-9b")
67
+
68
+ input_ids = tokenizer("What is the color of prunes?,", return_tensors='pt').to(model.device)["input_ids"]
69
+
70
+ outputs = model.generate(input_ids, max_new_tokens=216)
71
+ tokenizer.decode(outputs[0])
72
+ ```
73
+
74
+ ## Configurations
75
+
76
+ The configuration info are in `smash_config.json`.
77
+
78
+ ## Credits & License
79
+
80
+ The license of the smashed model follows the license of the original model. Please check the license of the original model THUDM/LongWriter-glm4-9b before using this model which provided the base model. The license of the `pruna-engine` is [here](https://pypi.org/project/pruna-engine/) on Pypi.
81
+
82
+ ## Want to compress other models?
83
+
84
+ - Contact us and tell us which model to compress next [here](https://www.pruna.ai/contact).
85
+ - Request access to easily compress your own AI models [here](https://z0halsaff74.typeform.com/pruna-access?typeform-source=www.pruna.ai).
config.json ADDED
@@ -0,0 +1,67 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "/ceph/hdd/staff/charpent/.cache/modelsdhkyhu_nhop2bfo6",
3
+ "add_bias_linear": false,
4
+ "add_qkv_bias": true,
5
+ "apply_query_key_layer_scaling": true,
6
+ "apply_residual_connection_post_layernorm": false,
7
+ "architectures": [
8
+ "ChatGLMForConditionalGeneration"
9
+ ],
10
+ "attention_dropout": 0.0,
11
+ "attention_softmax_in_fp32": true,
12
+ "auto_map": {
13
+ "AutoConfig": "configuration_chatglm.ChatGLMConfig",
14
+ "AutoModel": "THUDM/LongWriter-glm4-9b--modeling_chatglm.ChatGLMForConditionalGeneration",
15
+ "AutoModelForCausalLM": "modeling_chatglm.ChatGLMForConditionalGeneration",
16
+ "AutoModelForSeq2SeqLM": "THUDM/LongWriter-glm4-9b--modeling_chatglm.ChatGLMForConditionalGeneration",
17
+ "AutoModelForSequenceClassification": "THUDM/LongWriter-glm4-9b--modeling_chatglm.ChatGLMForSequenceClassification"
18
+ },
19
+ "bias_dropout_fusion": true,
20
+ "classifier_dropout": null,
21
+ "eos_token_id": [
22
+ 151329,
23
+ 151336,
24
+ 151338
25
+ ],
26
+ "ffn_hidden_size": 13696,
27
+ "fp32_residual_connection": false,
28
+ "hidden_dropout": 0.0,
29
+ "hidden_size": 4096,
30
+ "kv_channels": 128,
31
+ "layernorm_epsilon": 1.5625e-07,
32
+ "model_type": "chatglm",
33
+ "multi_query_attention": true,
34
+ "multi_query_group_num": 2,
35
+ "num_attention_heads": 32,
36
+ "num_hidden_layers": 40,
37
+ "num_layers": 40,
38
+ "original_rope": true,
39
+ "pad_token_id": 151329,
40
+ "padded_vocab_size": 151552,
41
+ "post_layer_norm": true,
42
+ "quantization_config": {
43
+ "_load_in_4bit": true,
44
+ "_load_in_8bit": false,
45
+ "bnb_4bit_compute_dtype": "bfloat16",
46
+ "bnb_4bit_quant_storage": "uint8",
47
+ "bnb_4bit_quant_type": "fp4",
48
+ "bnb_4bit_use_double_quant": false,
49
+ "llm_int8_enable_fp32_cpu_offload": false,
50
+ "llm_int8_has_fp16_weight": false,
51
+ "llm_int8_skip_modules": [
52
+ "lm_head"
53
+ ],
54
+ "llm_int8_threshold": 6.0,
55
+ "load_in_4bit": true,
56
+ "load_in_8bit": false,
57
+ "quant_method": "bitsandbytes"
58
+ },
59
+ "rmsnorm": true,
60
+ "rope_ratio": 500,
61
+ "seq_length": 1048576,
62
+ "tie_word_embeddings": false,
63
+ "torch_dtype": "bfloat16",
64
+ "transformers_version": "4.42.4",
65
+ "use_cache": true,
66
+ "vocab_size": 151552
67
+ }
configuration_chatglm.py ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from transformers import PretrainedConfig
2
+
3
+
4
+ class ChatGLMConfig(PretrainedConfig):
5
+ model_type = "chatglm"
6
+
7
+ def __init__(
8
+ self,
9
+ num_layers=28,
10
+ padded_vocab_size=65024,
11
+ hidden_size=4096,
12
+ ffn_hidden_size=13696,
13
+ kv_channels=128,
14
+ num_attention_heads=32,
15
+ seq_length=2048,
16
+ hidden_dropout=0.0,
17
+ classifier_dropout=None,
18
+ attention_dropout=0.0,
19
+ layernorm_epsilon=1e-5,
20
+ rmsnorm=True,
21
+ apply_residual_connection_post_layernorm=False,
22
+ post_layer_norm=True,
23
+ add_bias_linear=False,
24
+ add_qkv_bias=False,
25
+ bias_dropout_fusion=True,
26
+ multi_query_attention=False,
27
+ multi_query_group_num=1,
28
+ rope_ratio=1,
29
+ apply_query_key_layer_scaling=True,
30
+ attention_softmax_in_fp32=True,
31
+ fp32_residual_connection=False,
32
+ **kwargs
33
+ ):
34
+ self.num_layers = num_layers
35
+ self.vocab_size = padded_vocab_size
36
+ self.padded_vocab_size = padded_vocab_size
37
+ self.hidden_size = hidden_size
38
+ self.ffn_hidden_size = ffn_hidden_size
39
+ self.kv_channels = kv_channels
40
+ self.num_attention_heads = num_attention_heads
41
+ self.seq_length = seq_length
42
+ self.hidden_dropout = hidden_dropout
43
+ self.classifier_dropout = classifier_dropout
44
+ self.attention_dropout = attention_dropout
45
+ self.layernorm_epsilon = layernorm_epsilon
46
+ self.rmsnorm = rmsnorm
47
+ self.apply_residual_connection_post_layernorm = apply_residual_connection_post_layernorm
48
+ self.post_layer_norm = post_layer_norm
49
+ self.add_bias_linear = add_bias_linear
50
+ self.add_qkv_bias = add_qkv_bias
51
+ self.bias_dropout_fusion = bias_dropout_fusion
52
+ self.multi_query_attention = multi_query_attention
53
+ self.multi_query_group_num = multi_query_group_num
54
+ self.rope_ratio = rope_ratio
55
+ self.apply_query_key_layer_scaling = apply_query_key_layer_scaling
56
+ self.attention_softmax_in_fp32 = attention_softmax_in_fp32
57
+ self.fp32_residual_connection = fp32_residual_connection
58
+ super().__init__(**kwargs)
generation_config.json ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_from_model_config": true,
3
+ "eos_token_id": [
4
+ 151329,
5
+ 151336,
6
+ 151338
7
+ ],
8
+ "pad_token_id": 151329,
9
+ "transformers_version": "4.42.4"
10
+ }
model-00001-of-00002.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1e1d3c6fbd5642c24b57b9205f739fb036a1fe46e0e51826223fc0a8eceb5605
3
+ size 4996695308
model-00002-of-00002.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6b27bdda7afa891460dde7825493ceb8bddef2412a7e55213fbebe8b95856c24
3
+ size 1183988127
model.safetensors.index.json ADDED
@@ -0,0 +1,774 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "metadata": {
3
+ "total_size": 6180576195
4
+ },
5
+ "weight_map": {
6
+ "transformer.embedding.word_embeddings.weight": "model-00001-of-00002.safetensors",
7
+ "transformer.encoder.final_layernorm.weight": "model-00002-of-00002.safetensors",
8
+ "transformer.encoder.layers.0.input_layernorm.weight": "model-00001-of-00002.safetensors",
9
+ "transformer.encoder.layers.0.mlp.dense_4h_to_h.weight": "model-00001-of-00002.safetensors",
10
+ "transformer.encoder.layers.0.mlp.dense_4h_to_h.weight.absmax": "model-00001-of-00002.safetensors",
11
+ "transformer.encoder.layers.0.mlp.dense_4h_to_h.weight.quant_map": "model-00001-of-00002.safetensors",
12
+ "transformer.encoder.layers.0.mlp.dense_4h_to_h.weight.quant_state.bitsandbytes__fp4": "model-00001-of-00002.safetensors",
13
+ "transformer.encoder.layers.0.mlp.dense_h_to_4h.weight": "model-00001-of-00002.safetensors",
14
+ "transformer.encoder.layers.0.mlp.dense_h_to_4h.weight.absmax": "model-00001-of-00002.safetensors",
15
+ "transformer.encoder.layers.0.mlp.dense_h_to_4h.weight.quant_map": "model-00001-of-00002.safetensors",
16
+ "transformer.encoder.layers.0.mlp.dense_h_to_4h.weight.quant_state.bitsandbytes__fp4": "model-00001-of-00002.safetensors",
17
+ "transformer.encoder.layers.0.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
18
+ "transformer.encoder.layers.0.self_attention.dense.weight": "model-00001-of-00002.safetensors",
19
+ "transformer.encoder.layers.0.self_attention.dense.weight.absmax": "model-00001-of-00002.safetensors",
20
+ "transformer.encoder.layers.0.self_attention.dense.weight.quant_map": "model-00001-of-00002.safetensors",
21
+ "transformer.encoder.layers.0.self_attention.dense.weight.quant_state.bitsandbytes__fp4": "model-00001-of-00002.safetensors",
22
+ "transformer.encoder.layers.0.self_attention.query_key_value.bias": "model-00001-of-00002.safetensors",
23
+ "transformer.encoder.layers.0.self_attention.query_key_value.weight": "model-00001-of-00002.safetensors",
24
+ "transformer.encoder.layers.0.self_attention.query_key_value.weight.absmax": "model-00001-of-00002.safetensors",
25
+ "transformer.encoder.layers.0.self_attention.query_key_value.weight.quant_map": "model-00001-of-00002.safetensors",
26
+ "transformer.encoder.layers.0.self_attention.query_key_value.weight.quant_state.bitsandbytes__fp4": "model-00001-of-00002.safetensors",
27
+ "transformer.encoder.layers.1.input_layernorm.weight": "model-00001-of-00002.safetensors",
28
+ "transformer.encoder.layers.1.mlp.dense_4h_to_h.weight": "model-00001-of-00002.safetensors",
29
+ "transformer.encoder.layers.1.mlp.dense_4h_to_h.weight.absmax": "model-00001-of-00002.safetensors",
30
+ "transformer.encoder.layers.1.mlp.dense_4h_to_h.weight.quant_map": "model-00001-of-00002.safetensors",
31
+ "transformer.encoder.layers.1.mlp.dense_4h_to_h.weight.quant_state.bitsandbytes__fp4": "model-00001-of-00002.safetensors",
32
+ "transformer.encoder.layers.1.mlp.dense_h_to_4h.weight": "model-00001-of-00002.safetensors",
33
+ "transformer.encoder.layers.1.mlp.dense_h_to_4h.weight.absmax": "model-00001-of-00002.safetensors",
34
+ "transformer.encoder.layers.1.mlp.dense_h_to_4h.weight.quant_map": "model-00001-of-00002.safetensors",
35
+ "transformer.encoder.layers.1.mlp.dense_h_to_4h.weight.quant_state.bitsandbytes__fp4": "model-00001-of-00002.safetensors",
36
+ "transformer.encoder.layers.1.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
37
+ "transformer.encoder.layers.1.self_attention.dense.weight": "model-00001-of-00002.safetensors",
38
+ "transformer.encoder.layers.1.self_attention.dense.weight.absmax": "model-00001-of-00002.safetensors",
39
+ "transformer.encoder.layers.1.self_attention.dense.weight.quant_map": "model-00001-of-00002.safetensors",
40
+ "transformer.encoder.layers.1.self_attention.dense.weight.quant_state.bitsandbytes__fp4": "model-00001-of-00002.safetensors",
41
+ "transformer.encoder.layers.1.self_attention.query_key_value.bias": "model-00001-of-00002.safetensors",
42
+ "transformer.encoder.layers.1.self_attention.query_key_value.weight": "model-00001-of-00002.safetensors",
43
+ "transformer.encoder.layers.1.self_attention.query_key_value.weight.absmax": "model-00001-of-00002.safetensors",
44
+ "transformer.encoder.layers.1.self_attention.query_key_value.weight.quant_map": "model-00001-of-00002.safetensors",
45
+ "transformer.encoder.layers.1.self_attention.query_key_value.weight.quant_state.bitsandbytes__fp4": "model-00001-of-00002.safetensors",
46
+ "transformer.encoder.layers.10.input_layernorm.weight": "model-00001-of-00002.safetensors",
47
+ "transformer.encoder.layers.10.mlp.dense_4h_to_h.weight": "model-00001-of-00002.safetensors",
48
+ "transformer.encoder.layers.10.mlp.dense_4h_to_h.weight.absmax": "model-00001-of-00002.safetensors",
49
+ "transformer.encoder.layers.10.mlp.dense_4h_to_h.weight.quant_map": "model-00001-of-00002.safetensors",
50
+ "transformer.encoder.layers.10.mlp.dense_4h_to_h.weight.quant_state.bitsandbytes__fp4": "model-00001-of-00002.safetensors",
51
+ "transformer.encoder.layers.10.mlp.dense_h_to_4h.weight": "model-00001-of-00002.safetensors",
52
+ "transformer.encoder.layers.10.mlp.dense_h_to_4h.weight.absmax": "model-00001-of-00002.safetensors",
53
+ "transformer.encoder.layers.10.mlp.dense_h_to_4h.weight.quant_map": "model-00001-of-00002.safetensors",
54
+ "transformer.encoder.layers.10.mlp.dense_h_to_4h.weight.quant_state.bitsandbytes__fp4": "model-00001-of-00002.safetensors",
55
+ "transformer.encoder.layers.10.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
56
+ "transformer.encoder.layers.10.self_attention.dense.weight": "model-00001-of-00002.safetensors",
57
+ "transformer.encoder.layers.10.self_attention.dense.weight.absmax": "model-00001-of-00002.safetensors",
58
+ "transformer.encoder.layers.10.self_attention.dense.weight.quant_map": "model-00001-of-00002.safetensors",
59
+ "transformer.encoder.layers.10.self_attention.dense.weight.quant_state.bitsandbytes__fp4": "model-00001-of-00002.safetensors",
60
+ "transformer.encoder.layers.10.self_attention.query_key_value.bias": "model-00001-of-00002.safetensors",
61
+ "transformer.encoder.layers.10.self_attention.query_key_value.weight": "model-00001-of-00002.safetensors",
62
+ "transformer.encoder.layers.10.self_attention.query_key_value.weight.absmax": "model-00001-of-00002.safetensors",
63
+ "transformer.encoder.layers.10.self_attention.query_key_value.weight.quant_map": "model-00001-of-00002.safetensors",
64
+ "transformer.encoder.layers.10.self_attention.query_key_value.weight.quant_state.bitsandbytes__fp4": "model-00001-of-00002.safetensors",
65
+ "transformer.encoder.layers.11.input_layernorm.weight": "model-00001-of-00002.safetensors",
66
+ "transformer.encoder.layers.11.mlp.dense_4h_to_h.weight": "model-00001-of-00002.safetensors",
67
+ "transformer.encoder.layers.11.mlp.dense_4h_to_h.weight.absmax": "model-00001-of-00002.safetensors",
68
+ "transformer.encoder.layers.11.mlp.dense_4h_to_h.weight.quant_map": "model-00001-of-00002.safetensors",
69
+ "transformer.encoder.layers.11.mlp.dense_4h_to_h.weight.quant_state.bitsandbytes__fp4": "model-00001-of-00002.safetensors",
70
+ "transformer.encoder.layers.11.mlp.dense_h_to_4h.weight": "model-00001-of-00002.safetensors",
71
+ "transformer.encoder.layers.11.mlp.dense_h_to_4h.weight.absmax": "model-00001-of-00002.safetensors",
72
+ "transformer.encoder.layers.11.mlp.dense_h_to_4h.weight.quant_map": "model-00001-of-00002.safetensors",
73
+ "transformer.encoder.layers.11.mlp.dense_h_to_4h.weight.quant_state.bitsandbytes__fp4": "model-00001-of-00002.safetensors",
74
+ "transformer.encoder.layers.11.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
75
+ "transformer.encoder.layers.11.self_attention.dense.weight": "model-00001-of-00002.safetensors",
76
+ "transformer.encoder.layers.11.self_attention.dense.weight.absmax": "model-00001-of-00002.safetensors",
77
+ "transformer.encoder.layers.11.self_attention.dense.weight.quant_map": "model-00001-of-00002.safetensors",
78
+ "transformer.encoder.layers.11.self_attention.dense.weight.quant_state.bitsandbytes__fp4": "model-00001-of-00002.safetensors",
79
+ "transformer.encoder.layers.11.self_attention.query_key_value.bias": "model-00001-of-00002.safetensors",
80
+ "transformer.encoder.layers.11.self_attention.query_key_value.weight": "model-00001-of-00002.safetensors",
81
+ "transformer.encoder.layers.11.self_attention.query_key_value.weight.absmax": "model-00001-of-00002.safetensors",
82
+ "transformer.encoder.layers.11.self_attention.query_key_value.weight.quant_map": "model-00001-of-00002.safetensors",
83
+ "transformer.encoder.layers.11.self_attention.query_key_value.weight.quant_state.bitsandbytes__fp4": "model-00001-of-00002.safetensors",
84
+ "transformer.encoder.layers.12.input_layernorm.weight": "model-00001-of-00002.safetensors",
85
+ "transformer.encoder.layers.12.mlp.dense_4h_to_h.weight": "model-00001-of-00002.safetensors",
86
+ "transformer.encoder.layers.12.mlp.dense_4h_to_h.weight.absmax": "model-00001-of-00002.safetensors",
87
+ "transformer.encoder.layers.12.mlp.dense_4h_to_h.weight.quant_map": "model-00001-of-00002.safetensors",
88
+ "transformer.encoder.layers.12.mlp.dense_4h_to_h.weight.quant_state.bitsandbytes__fp4": "model-00001-of-00002.safetensors",
89
+ "transformer.encoder.layers.12.mlp.dense_h_to_4h.weight": "model-00001-of-00002.safetensors",
90
+ "transformer.encoder.layers.12.mlp.dense_h_to_4h.weight.absmax": "model-00001-of-00002.safetensors",
91
+ "transformer.encoder.layers.12.mlp.dense_h_to_4h.weight.quant_map": "model-00001-of-00002.safetensors",
92
+ "transformer.encoder.layers.12.mlp.dense_h_to_4h.weight.quant_state.bitsandbytes__fp4": "model-00001-of-00002.safetensors",
93
+ "transformer.encoder.layers.12.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
94
+ "transformer.encoder.layers.12.self_attention.dense.weight": "model-00001-of-00002.safetensors",
95
+ "transformer.encoder.layers.12.self_attention.dense.weight.absmax": "model-00001-of-00002.safetensors",
96
+ "transformer.encoder.layers.12.self_attention.dense.weight.quant_map": "model-00001-of-00002.safetensors",
97
+ "transformer.encoder.layers.12.self_attention.dense.weight.quant_state.bitsandbytes__fp4": "model-00001-of-00002.safetensors",
98
+ "transformer.encoder.layers.12.self_attention.query_key_value.bias": "model-00001-of-00002.safetensors",
99
+ "transformer.encoder.layers.12.self_attention.query_key_value.weight": "model-00001-of-00002.safetensors",
100
+ "transformer.encoder.layers.12.self_attention.query_key_value.weight.absmax": "model-00001-of-00002.safetensors",
101
+ "transformer.encoder.layers.12.self_attention.query_key_value.weight.quant_map": "model-00001-of-00002.safetensors",
102
+ "transformer.encoder.layers.12.self_attention.query_key_value.weight.quant_state.bitsandbytes__fp4": "model-00001-of-00002.safetensors",
103
+ "transformer.encoder.layers.13.input_layernorm.weight": "model-00001-of-00002.safetensors",
104
+ "transformer.encoder.layers.13.mlp.dense_4h_to_h.weight": "model-00001-of-00002.safetensors",
105
+ "transformer.encoder.layers.13.mlp.dense_4h_to_h.weight.absmax": "model-00001-of-00002.safetensors",
106
+ "transformer.encoder.layers.13.mlp.dense_4h_to_h.weight.quant_map": "model-00001-of-00002.safetensors",
107
+ "transformer.encoder.layers.13.mlp.dense_4h_to_h.weight.quant_state.bitsandbytes__fp4": "model-00001-of-00002.safetensors",
108
+ "transformer.encoder.layers.13.mlp.dense_h_to_4h.weight": "model-00001-of-00002.safetensors",
109
+ "transformer.encoder.layers.13.mlp.dense_h_to_4h.weight.absmax": "model-00001-of-00002.safetensors",
110
+ "transformer.encoder.layers.13.mlp.dense_h_to_4h.weight.quant_map": "model-00001-of-00002.safetensors",
111
+ "transformer.encoder.layers.13.mlp.dense_h_to_4h.weight.quant_state.bitsandbytes__fp4": "model-00001-of-00002.safetensors",
112
+ "transformer.encoder.layers.13.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
113
+ "transformer.encoder.layers.13.self_attention.dense.weight": "model-00001-of-00002.safetensors",
114
+ "transformer.encoder.layers.13.self_attention.dense.weight.absmax": "model-00001-of-00002.safetensors",
115
+ "transformer.encoder.layers.13.self_attention.dense.weight.quant_map": "model-00001-of-00002.safetensors",
116
+ "transformer.encoder.layers.13.self_attention.dense.weight.quant_state.bitsandbytes__fp4": "model-00001-of-00002.safetensors",
117
+ "transformer.encoder.layers.13.self_attention.query_key_value.bias": "model-00001-of-00002.safetensors",
118
+ "transformer.encoder.layers.13.self_attention.query_key_value.weight": "model-00001-of-00002.safetensors",
119
+ "transformer.encoder.layers.13.self_attention.query_key_value.weight.absmax": "model-00001-of-00002.safetensors",
120
+ "transformer.encoder.layers.13.self_attention.query_key_value.weight.quant_map": "model-00001-of-00002.safetensors",
121
+ "transformer.encoder.layers.13.self_attention.query_key_value.weight.quant_state.bitsandbytes__fp4": "model-00001-of-00002.safetensors",
122
+ "transformer.encoder.layers.14.input_layernorm.weight": "model-00001-of-00002.safetensors",
123
+ "transformer.encoder.layers.14.mlp.dense_4h_to_h.weight": "model-00001-of-00002.safetensors",
124
+ "transformer.encoder.layers.14.mlp.dense_4h_to_h.weight.absmax": "model-00001-of-00002.safetensors",
125
+ "transformer.encoder.layers.14.mlp.dense_4h_to_h.weight.quant_map": "model-00001-of-00002.safetensors",
126
+ "transformer.encoder.layers.14.mlp.dense_4h_to_h.weight.quant_state.bitsandbytes__fp4": "model-00001-of-00002.safetensors",
127
+ "transformer.encoder.layers.14.mlp.dense_h_to_4h.weight": "model-00001-of-00002.safetensors",
128
+ "transformer.encoder.layers.14.mlp.dense_h_to_4h.weight.absmax": "model-00001-of-00002.safetensors",
129
+ "transformer.encoder.layers.14.mlp.dense_h_to_4h.weight.quant_map": "model-00001-of-00002.safetensors",
130
+ "transformer.encoder.layers.14.mlp.dense_h_to_4h.weight.quant_state.bitsandbytes__fp4": "model-00001-of-00002.safetensors",
131
+ "transformer.encoder.layers.14.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
132
+ "transformer.encoder.layers.14.self_attention.dense.weight": "model-00001-of-00002.safetensors",
133
+ "transformer.encoder.layers.14.self_attention.dense.weight.absmax": "model-00001-of-00002.safetensors",
134
+ "transformer.encoder.layers.14.self_attention.dense.weight.quant_map": "model-00001-of-00002.safetensors",
135
+ "transformer.encoder.layers.14.self_attention.dense.weight.quant_state.bitsandbytes__fp4": "model-00001-of-00002.safetensors",
136
+ "transformer.encoder.layers.14.self_attention.query_key_value.bias": "model-00001-of-00002.safetensors",
137
+ "transformer.encoder.layers.14.self_attention.query_key_value.weight": "model-00001-of-00002.safetensors",
138
+ "transformer.encoder.layers.14.self_attention.query_key_value.weight.absmax": "model-00001-of-00002.safetensors",
139
+ "transformer.encoder.layers.14.self_attention.query_key_value.weight.quant_map": "model-00001-of-00002.safetensors",
140
+ "transformer.encoder.layers.14.self_attention.query_key_value.weight.quant_state.bitsandbytes__fp4": "model-00001-of-00002.safetensors",
141
+ "transformer.encoder.layers.15.input_layernorm.weight": "model-00001-of-00002.safetensors",
142
+ "transformer.encoder.layers.15.mlp.dense_4h_to_h.weight": "model-00001-of-00002.safetensors",
143
+ "transformer.encoder.layers.15.mlp.dense_4h_to_h.weight.absmax": "model-00001-of-00002.safetensors",
144
+ "transformer.encoder.layers.15.mlp.dense_4h_to_h.weight.quant_map": "model-00001-of-00002.safetensors",
145
+ "transformer.encoder.layers.15.mlp.dense_4h_to_h.weight.quant_state.bitsandbytes__fp4": "model-00001-of-00002.safetensors",
146
+ "transformer.encoder.layers.15.mlp.dense_h_to_4h.weight": "model-00001-of-00002.safetensors",
147
+ "transformer.encoder.layers.15.mlp.dense_h_to_4h.weight.absmax": "model-00001-of-00002.safetensors",
148
+ "transformer.encoder.layers.15.mlp.dense_h_to_4h.weight.quant_map": "model-00001-of-00002.safetensors",
149
+ "transformer.encoder.layers.15.mlp.dense_h_to_4h.weight.quant_state.bitsandbytes__fp4": "model-00001-of-00002.safetensors",
150
+ "transformer.encoder.layers.15.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
151
+ "transformer.encoder.layers.15.self_attention.dense.weight": "model-00001-of-00002.safetensors",
152
+ "transformer.encoder.layers.15.self_attention.dense.weight.absmax": "model-00001-of-00002.safetensors",
153
+ "transformer.encoder.layers.15.self_attention.dense.weight.quant_map": "model-00001-of-00002.safetensors",
154
+ "transformer.encoder.layers.15.self_attention.dense.weight.quant_state.bitsandbytes__fp4": "model-00001-of-00002.safetensors",
155
+ "transformer.encoder.layers.15.self_attention.query_key_value.bias": "model-00001-of-00002.safetensors",
156
+ "transformer.encoder.layers.15.self_attention.query_key_value.weight": "model-00001-of-00002.safetensors",
157
+ "transformer.encoder.layers.15.self_attention.query_key_value.weight.absmax": "model-00001-of-00002.safetensors",
158
+ "transformer.encoder.layers.15.self_attention.query_key_value.weight.quant_map": "model-00001-of-00002.safetensors",
159
+ "transformer.encoder.layers.15.self_attention.query_key_value.weight.quant_state.bitsandbytes__fp4": "model-00001-of-00002.safetensors",
160
+ "transformer.encoder.layers.16.input_layernorm.weight": "model-00001-of-00002.safetensors",
161
+ "transformer.encoder.layers.16.mlp.dense_4h_to_h.weight": "model-00001-of-00002.safetensors",
162
+ "transformer.encoder.layers.16.mlp.dense_4h_to_h.weight.absmax": "model-00001-of-00002.safetensors",
163
+ "transformer.encoder.layers.16.mlp.dense_4h_to_h.weight.quant_map": "model-00001-of-00002.safetensors",
164
+ "transformer.encoder.layers.16.mlp.dense_4h_to_h.weight.quant_state.bitsandbytes__fp4": "model-00001-of-00002.safetensors",
165
+ "transformer.encoder.layers.16.mlp.dense_h_to_4h.weight": "model-00001-of-00002.safetensors",
166
+ "transformer.encoder.layers.16.mlp.dense_h_to_4h.weight.absmax": "model-00001-of-00002.safetensors",
167
+ "transformer.encoder.layers.16.mlp.dense_h_to_4h.weight.quant_map": "model-00001-of-00002.safetensors",
168
+ "transformer.encoder.layers.16.mlp.dense_h_to_4h.weight.quant_state.bitsandbytes__fp4": "model-00001-of-00002.safetensors",
169
+ "transformer.encoder.layers.16.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
170
+ "transformer.encoder.layers.16.self_attention.dense.weight": "model-00001-of-00002.safetensors",
171
+ "transformer.encoder.layers.16.self_attention.dense.weight.absmax": "model-00001-of-00002.safetensors",
172
+ "transformer.encoder.layers.16.self_attention.dense.weight.quant_map": "model-00001-of-00002.safetensors",
173
+ "transformer.encoder.layers.16.self_attention.dense.weight.quant_state.bitsandbytes__fp4": "model-00001-of-00002.safetensors",
174
+ "transformer.encoder.layers.16.self_attention.query_key_value.bias": "model-00001-of-00002.safetensors",
175
+ "transformer.encoder.layers.16.self_attention.query_key_value.weight": "model-00001-of-00002.safetensors",
176
+ "transformer.encoder.layers.16.self_attention.query_key_value.weight.absmax": "model-00001-of-00002.safetensors",
177
+ "transformer.encoder.layers.16.self_attention.query_key_value.weight.quant_map": "model-00001-of-00002.safetensors",
178
+ "transformer.encoder.layers.16.self_attention.query_key_value.weight.quant_state.bitsandbytes__fp4": "model-00001-of-00002.safetensors",
179
+ "transformer.encoder.layers.17.input_layernorm.weight": "model-00001-of-00002.safetensors",
180
+ "transformer.encoder.layers.17.mlp.dense_4h_to_h.weight": "model-00001-of-00002.safetensors",
181
+ "transformer.encoder.layers.17.mlp.dense_4h_to_h.weight.absmax": "model-00001-of-00002.safetensors",
182
+ "transformer.encoder.layers.17.mlp.dense_4h_to_h.weight.quant_map": "model-00001-of-00002.safetensors",
183
+ "transformer.encoder.layers.17.mlp.dense_4h_to_h.weight.quant_state.bitsandbytes__fp4": "model-00001-of-00002.safetensors",
184
+ "transformer.encoder.layers.17.mlp.dense_h_to_4h.weight": "model-00001-of-00002.safetensors",
185
+ "transformer.encoder.layers.17.mlp.dense_h_to_4h.weight.absmax": "model-00001-of-00002.safetensors",
186
+ "transformer.encoder.layers.17.mlp.dense_h_to_4h.weight.quant_map": "model-00001-of-00002.safetensors",
187
+ "transformer.encoder.layers.17.mlp.dense_h_to_4h.weight.quant_state.bitsandbytes__fp4": "model-00001-of-00002.safetensors",
188
+ "transformer.encoder.layers.17.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
189
+ "transformer.encoder.layers.17.self_attention.dense.weight": "model-00001-of-00002.safetensors",
190
+ "transformer.encoder.layers.17.self_attention.dense.weight.absmax": "model-00001-of-00002.safetensors",
191
+ "transformer.encoder.layers.17.self_attention.dense.weight.quant_map": "model-00001-of-00002.safetensors",
192
+ "transformer.encoder.layers.17.self_attention.dense.weight.quant_state.bitsandbytes__fp4": "model-00001-of-00002.safetensors",
193
+ "transformer.encoder.layers.17.self_attention.query_key_value.bias": "model-00001-of-00002.safetensors",
194
+ "transformer.encoder.layers.17.self_attention.query_key_value.weight": "model-00001-of-00002.safetensors",
195
+ "transformer.encoder.layers.17.self_attention.query_key_value.weight.absmax": "model-00001-of-00002.safetensors",
196
+ "transformer.encoder.layers.17.self_attention.query_key_value.weight.quant_map": "model-00001-of-00002.safetensors",
197
+ "transformer.encoder.layers.17.self_attention.query_key_value.weight.quant_state.bitsandbytes__fp4": "model-00001-of-00002.safetensors",
198
+ "transformer.encoder.layers.18.input_layernorm.weight": "model-00001-of-00002.safetensors",
199
+ "transformer.encoder.layers.18.mlp.dense_4h_to_h.weight": "model-00001-of-00002.safetensors",
200
+ "transformer.encoder.layers.18.mlp.dense_4h_to_h.weight.absmax": "model-00001-of-00002.safetensors",
201
+ "transformer.encoder.layers.18.mlp.dense_4h_to_h.weight.quant_map": "model-00001-of-00002.safetensors",
202
+ "transformer.encoder.layers.18.mlp.dense_4h_to_h.weight.quant_state.bitsandbytes__fp4": "model-00001-of-00002.safetensors",
203
+ "transformer.encoder.layers.18.mlp.dense_h_to_4h.weight": "model-00001-of-00002.safetensors",
204
+ "transformer.encoder.layers.18.mlp.dense_h_to_4h.weight.absmax": "model-00001-of-00002.safetensors",
205
+ "transformer.encoder.layers.18.mlp.dense_h_to_4h.weight.quant_map": "model-00001-of-00002.safetensors",
206
+ "transformer.encoder.layers.18.mlp.dense_h_to_4h.weight.quant_state.bitsandbytes__fp4": "model-00001-of-00002.safetensors",
207
+ "transformer.encoder.layers.18.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
208
+ "transformer.encoder.layers.18.self_attention.dense.weight": "model-00001-of-00002.safetensors",
209
+ "transformer.encoder.layers.18.self_attention.dense.weight.absmax": "model-00001-of-00002.safetensors",
210
+ "transformer.encoder.layers.18.self_attention.dense.weight.quant_map": "model-00001-of-00002.safetensors",
211
+ "transformer.encoder.layers.18.self_attention.dense.weight.quant_state.bitsandbytes__fp4": "model-00001-of-00002.safetensors",
212
+ "transformer.encoder.layers.18.self_attention.query_key_value.bias": "model-00001-of-00002.safetensors",
213
+ "transformer.encoder.layers.18.self_attention.query_key_value.weight": "model-00001-of-00002.safetensors",
214
+ "transformer.encoder.layers.18.self_attention.query_key_value.weight.absmax": "model-00001-of-00002.safetensors",
215
+ "transformer.encoder.layers.18.self_attention.query_key_value.weight.quant_map": "model-00001-of-00002.safetensors",
216
+ "transformer.encoder.layers.18.self_attention.query_key_value.weight.quant_state.bitsandbytes__fp4": "model-00001-of-00002.safetensors",
217
+ "transformer.encoder.layers.19.input_layernorm.weight": "model-00001-of-00002.safetensors",
218
+ "transformer.encoder.layers.19.mlp.dense_4h_to_h.weight": "model-00001-of-00002.safetensors",
219
+ "transformer.encoder.layers.19.mlp.dense_4h_to_h.weight.absmax": "model-00001-of-00002.safetensors",
220
+ "transformer.encoder.layers.19.mlp.dense_4h_to_h.weight.quant_map": "model-00001-of-00002.safetensors",
221
+ "transformer.encoder.layers.19.mlp.dense_4h_to_h.weight.quant_state.bitsandbytes__fp4": "model-00001-of-00002.safetensors",
222
+ "transformer.encoder.layers.19.mlp.dense_h_to_4h.weight": "model-00001-of-00002.safetensors",
223
+ "transformer.encoder.layers.19.mlp.dense_h_to_4h.weight.absmax": "model-00001-of-00002.safetensors",
224
+ "transformer.encoder.layers.19.mlp.dense_h_to_4h.weight.quant_map": "model-00001-of-00002.safetensors",
225
+ "transformer.encoder.layers.19.mlp.dense_h_to_4h.weight.quant_state.bitsandbytes__fp4": "model-00001-of-00002.safetensors",
226
+ "transformer.encoder.layers.19.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
227
+ "transformer.encoder.layers.19.self_attention.dense.weight": "model-00001-of-00002.safetensors",
228
+ "transformer.encoder.layers.19.self_attention.dense.weight.absmax": "model-00001-of-00002.safetensors",
229
+ "transformer.encoder.layers.19.self_attention.dense.weight.quant_map": "model-00001-of-00002.safetensors",
230
+ "transformer.encoder.layers.19.self_attention.dense.weight.quant_state.bitsandbytes__fp4": "model-00001-of-00002.safetensors",
231
+ "transformer.encoder.layers.19.self_attention.query_key_value.bias": "model-00001-of-00002.safetensors",
232
+ "transformer.encoder.layers.19.self_attention.query_key_value.weight": "model-00001-of-00002.safetensors",
233
+ "transformer.encoder.layers.19.self_attention.query_key_value.weight.absmax": "model-00001-of-00002.safetensors",
234
+ "transformer.encoder.layers.19.self_attention.query_key_value.weight.quant_map": "model-00001-of-00002.safetensors",
235
+ "transformer.encoder.layers.19.self_attention.query_key_value.weight.quant_state.bitsandbytes__fp4": "model-00001-of-00002.safetensors",
236
+ "transformer.encoder.layers.2.input_layernorm.weight": "model-00001-of-00002.safetensors",
237
+ "transformer.encoder.layers.2.mlp.dense_4h_to_h.weight": "model-00001-of-00002.safetensors",
238
+ "transformer.encoder.layers.2.mlp.dense_4h_to_h.weight.absmax": "model-00001-of-00002.safetensors",
239
+ "transformer.encoder.layers.2.mlp.dense_4h_to_h.weight.quant_map": "model-00001-of-00002.safetensors",
240
+ "transformer.encoder.layers.2.mlp.dense_4h_to_h.weight.quant_state.bitsandbytes__fp4": "model-00001-of-00002.safetensors",
241
+ "transformer.encoder.layers.2.mlp.dense_h_to_4h.weight": "model-00001-of-00002.safetensors",
242
+ "transformer.encoder.layers.2.mlp.dense_h_to_4h.weight.absmax": "model-00001-of-00002.safetensors",
243
+ "transformer.encoder.layers.2.mlp.dense_h_to_4h.weight.quant_map": "model-00001-of-00002.safetensors",
244
+ "transformer.encoder.layers.2.mlp.dense_h_to_4h.weight.quant_state.bitsandbytes__fp4": "model-00001-of-00002.safetensors",
245
+ "transformer.encoder.layers.2.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
246
+ "transformer.encoder.layers.2.self_attention.dense.weight": "model-00001-of-00002.safetensors",
247
+ "transformer.encoder.layers.2.self_attention.dense.weight.absmax": "model-00001-of-00002.safetensors",
248
+ "transformer.encoder.layers.2.self_attention.dense.weight.quant_map": "model-00001-of-00002.safetensors",
249
+ "transformer.encoder.layers.2.self_attention.dense.weight.quant_state.bitsandbytes__fp4": "model-00001-of-00002.safetensors",
250
+ "transformer.encoder.layers.2.self_attention.query_key_value.bias": "model-00001-of-00002.safetensors",
251
+ "transformer.encoder.layers.2.self_attention.query_key_value.weight": "model-00001-of-00002.safetensors",
252
+ "transformer.encoder.layers.2.self_attention.query_key_value.weight.absmax": "model-00001-of-00002.safetensors",
253
+ "transformer.encoder.layers.2.self_attention.query_key_value.weight.quant_map": "model-00001-of-00002.safetensors",
254
+ "transformer.encoder.layers.2.self_attention.query_key_value.weight.quant_state.bitsandbytes__fp4": "model-00001-of-00002.safetensors",
255
+ "transformer.encoder.layers.20.input_layernorm.weight": "model-00001-of-00002.safetensors",
256
+ "transformer.encoder.layers.20.mlp.dense_4h_to_h.weight": "model-00001-of-00002.safetensors",
257
+ "transformer.encoder.layers.20.mlp.dense_4h_to_h.weight.absmax": "model-00001-of-00002.safetensors",
258
+ "transformer.encoder.layers.20.mlp.dense_4h_to_h.weight.quant_map": "model-00001-of-00002.safetensors",
259
+ "transformer.encoder.layers.20.mlp.dense_4h_to_h.weight.quant_state.bitsandbytes__fp4": "model-00001-of-00002.safetensors",
260
+ "transformer.encoder.layers.20.mlp.dense_h_to_4h.weight": "model-00001-of-00002.safetensors",
261
+ "transformer.encoder.layers.20.mlp.dense_h_to_4h.weight.absmax": "model-00001-of-00002.safetensors",
262
+ "transformer.encoder.layers.20.mlp.dense_h_to_4h.weight.quant_map": "model-00001-of-00002.safetensors",
263
+ "transformer.encoder.layers.20.mlp.dense_h_to_4h.weight.quant_state.bitsandbytes__fp4": "model-00001-of-00002.safetensors",
264
+ "transformer.encoder.layers.20.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
265
+ "transformer.encoder.layers.20.self_attention.dense.weight": "model-00001-of-00002.safetensors",
266
+ "transformer.encoder.layers.20.self_attention.dense.weight.absmax": "model-00001-of-00002.safetensors",
267
+ "transformer.encoder.layers.20.self_attention.dense.weight.quant_map": "model-00001-of-00002.safetensors",
268
+ "transformer.encoder.layers.20.self_attention.dense.weight.quant_state.bitsandbytes__fp4": "model-00001-of-00002.safetensors",
269
+ "transformer.encoder.layers.20.self_attention.query_key_value.bias": "model-00001-of-00002.safetensors",
270
+ "transformer.encoder.layers.20.self_attention.query_key_value.weight": "model-00001-of-00002.safetensors",
271
+ "transformer.encoder.layers.20.self_attention.query_key_value.weight.absmax": "model-00001-of-00002.safetensors",
272
+ "transformer.encoder.layers.20.self_attention.query_key_value.weight.quant_map": "model-00001-of-00002.safetensors",
273
+ "transformer.encoder.layers.20.self_attention.query_key_value.weight.quant_state.bitsandbytes__fp4": "model-00001-of-00002.safetensors",
274
+ "transformer.encoder.layers.21.input_layernorm.weight": "model-00001-of-00002.safetensors",
275
+ "transformer.encoder.layers.21.mlp.dense_4h_to_h.weight": "model-00001-of-00002.safetensors",
276
+ "transformer.encoder.layers.21.mlp.dense_4h_to_h.weight.absmax": "model-00001-of-00002.safetensors",
277
+ "transformer.encoder.layers.21.mlp.dense_4h_to_h.weight.quant_map": "model-00001-of-00002.safetensors",
278
+ "transformer.encoder.layers.21.mlp.dense_4h_to_h.weight.quant_state.bitsandbytes__fp4": "model-00001-of-00002.safetensors",
279
+ "transformer.encoder.layers.21.mlp.dense_h_to_4h.weight": "model-00001-of-00002.safetensors",
280
+ "transformer.encoder.layers.21.mlp.dense_h_to_4h.weight.absmax": "model-00001-of-00002.safetensors",
281
+ "transformer.encoder.layers.21.mlp.dense_h_to_4h.weight.quant_map": "model-00001-of-00002.safetensors",
282
+ "transformer.encoder.layers.21.mlp.dense_h_to_4h.weight.quant_state.bitsandbytes__fp4": "model-00001-of-00002.safetensors",
283
+ "transformer.encoder.layers.21.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
284
+ "transformer.encoder.layers.21.self_attention.dense.weight": "model-00001-of-00002.safetensors",
285
+ "transformer.encoder.layers.21.self_attention.dense.weight.absmax": "model-00001-of-00002.safetensors",
286
+ "transformer.encoder.layers.21.self_attention.dense.weight.quant_map": "model-00001-of-00002.safetensors",
287
+ "transformer.encoder.layers.21.self_attention.dense.weight.quant_state.bitsandbytes__fp4": "model-00001-of-00002.safetensors",
288
+ "transformer.encoder.layers.21.self_attention.query_key_value.bias": "model-00001-of-00002.safetensors",
289
+ "transformer.encoder.layers.21.self_attention.query_key_value.weight": "model-00001-of-00002.safetensors",
290
+ "transformer.encoder.layers.21.self_attention.query_key_value.weight.absmax": "model-00001-of-00002.safetensors",
291
+ "transformer.encoder.layers.21.self_attention.query_key_value.weight.quant_map": "model-00001-of-00002.safetensors",
292
+ "transformer.encoder.layers.21.self_attention.query_key_value.weight.quant_state.bitsandbytes__fp4": "model-00001-of-00002.safetensors",
293
+ "transformer.encoder.layers.22.input_layernorm.weight": "model-00001-of-00002.safetensors",
294
+ "transformer.encoder.layers.22.mlp.dense_4h_to_h.weight": "model-00001-of-00002.safetensors",
295
+ "transformer.encoder.layers.22.mlp.dense_4h_to_h.weight.absmax": "model-00001-of-00002.safetensors",
296
+ "transformer.encoder.layers.22.mlp.dense_4h_to_h.weight.quant_map": "model-00001-of-00002.safetensors",
297
+ "transformer.encoder.layers.22.mlp.dense_4h_to_h.weight.quant_state.bitsandbytes__fp4": "model-00001-of-00002.safetensors",
298
+ "transformer.encoder.layers.22.mlp.dense_h_to_4h.weight": "model-00001-of-00002.safetensors",
299
+ "transformer.encoder.layers.22.mlp.dense_h_to_4h.weight.absmax": "model-00001-of-00002.safetensors",
300
+ "transformer.encoder.layers.22.mlp.dense_h_to_4h.weight.quant_map": "model-00001-of-00002.safetensors",
301
+ "transformer.encoder.layers.22.mlp.dense_h_to_4h.weight.quant_state.bitsandbytes__fp4": "model-00001-of-00002.safetensors",
302
+ "transformer.encoder.layers.22.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
303
+ "transformer.encoder.layers.22.self_attention.dense.weight": "model-00001-of-00002.safetensors",
304
+ "transformer.encoder.layers.22.self_attention.dense.weight.absmax": "model-00001-of-00002.safetensors",
305
+ "transformer.encoder.layers.22.self_attention.dense.weight.quant_map": "model-00001-of-00002.safetensors",
306
+ "transformer.encoder.layers.22.self_attention.dense.weight.quant_state.bitsandbytes__fp4": "model-00001-of-00002.safetensors",
307
+ "transformer.encoder.layers.22.self_attention.query_key_value.bias": "model-00001-of-00002.safetensors",
308
+ "transformer.encoder.layers.22.self_attention.query_key_value.weight": "model-00001-of-00002.safetensors",
309
+ "transformer.encoder.layers.22.self_attention.query_key_value.weight.absmax": "model-00001-of-00002.safetensors",
310
+ "transformer.encoder.layers.22.self_attention.query_key_value.weight.quant_map": "model-00001-of-00002.safetensors",
311
+ "transformer.encoder.layers.22.self_attention.query_key_value.weight.quant_state.bitsandbytes__fp4": "model-00001-of-00002.safetensors",
312
+ "transformer.encoder.layers.23.input_layernorm.weight": "model-00001-of-00002.safetensors",
313
+ "transformer.encoder.layers.23.mlp.dense_4h_to_h.weight": "model-00001-of-00002.safetensors",
314
+ "transformer.encoder.layers.23.mlp.dense_4h_to_h.weight.absmax": "model-00001-of-00002.safetensors",
315
+ "transformer.encoder.layers.23.mlp.dense_4h_to_h.weight.quant_map": "model-00001-of-00002.safetensors",
316
+ "transformer.encoder.layers.23.mlp.dense_4h_to_h.weight.quant_state.bitsandbytes__fp4": "model-00001-of-00002.safetensors",
317
+ "transformer.encoder.layers.23.mlp.dense_h_to_4h.weight": "model-00001-of-00002.safetensors",
318
+ "transformer.encoder.layers.23.mlp.dense_h_to_4h.weight.absmax": "model-00001-of-00002.safetensors",
319
+ "transformer.encoder.layers.23.mlp.dense_h_to_4h.weight.quant_map": "model-00001-of-00002.safetensors",
320
+ "transformer.encoder.layers.23.mlp.dense_h_to_4h.weight.quant_state.bitsandbytes__fp4": "model-00001-of-00002.safetensors",
321
+ "transformer.encoder.layers.23.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
322
+ "transformer.encoder.layers.23.self_attention.dense.weight": "model-00001-of-00002.safetensors",
323
+ "transformer.encoder.layers.23.self_attention.dense.weight.absmax": "model-00001-of-00002.safetensors",
324
+ "transformer.encoder.layers.23.self_attention.dense.weight.quant_map": "model-00001-of-00002.safetensors",
325
+ "transformer.encoder.layers.23.self_attention.dense.weight.quant_state.bitsandbytes__fp4": "model-00001-of-00002.safetensors",
326
+ "transformer.encoder.layers.23.self_attention.query_key_value.bias": "model-00001-of-00002.safetensors",
327
+ "transformer.encoder.layers.23.self_attention.query_key_value.weight": "model-00001-of-00002.safetensors",
328
+ "transformer.encoder.layers.23.self_attention.query_key_value.weight.absmax": "model-00001-of-00002.safetensors",
329
+ "transformer.encoder.layers.23.self_attention.query_key_value.weight.quant_map": "model-00001-of-00002.safetensors",
330
+ "transformer.encoder.layers.23.self_attention.query_key_value.weight.quant_state.bitsandbytes__fp4": "model-00001-of-00002.safetensors",
331
+ "transformer.encoder.layers.24.input_layernorm.weight": "model-00001-of-00002.safetensors",
332
+ "transformer.encoder.layers.24.mlp.dense_4h_to_h.weight": "model-00001-of-00002.safetensors",
333
+ "transformer.encoder.layers.24.mlp.dense_4h_to_h.weight.absmax": "model-00001-of-00002.safetensors",
334
+ "transformer.encoder.layers.24.mlp.dense_4h_to_h.weight.quant_map": "model-00001-of-00002.safetensors",
335
+ "transformer.encoder.layers.24.mlp.dense_4h_to_h.weight.quant_state.bitsandbytes__fp4": "model-00001-of-00002.safetensors",
336
+ "transformer.encoder.layers.24.mlp.dense_h_to_4h.weight": "model-00001-of-00002.safetensors",
337
+ "transformer.encoder.layers.24.mlp.dense_h_to_4h.weight.absmax": "model-00001-of-00002.safetensors",
338
+ "transformer.encoder.layers.24.mlp.dense_h_to_4h.weight.quant_map": "model-00001-of-00002.safetensors",
339
+ "transformer.encoder.layers.24.mlp.dense_h_to_4h.weight.quant_state.bitsandbytes__fp4": "model-00001-of-00002.safetensors",
340
+ "transformer.encoder.layers.24.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
341
+ "transformer.encoder.layers.24.self_attention.dense.weight": "model-00001-of-00002.safetensors",
342
+ "transformer.encoder.layers.24.self_attention.dense.weight.absmax": "model-00001-of-00002.safetensors",
343
+ "transformer.encoder.layers.24.self_attention.dense.weight.quant_map": "model-00001-of-00002.safetensors",
344
+ "transformer.encoder.layers.24.self_attention.dense.weight.quant_state.bitsandbytes__fp4": "model-00001-of-00002.safetensors",
345
+ "transformer.encoder.layers.24.self_attention.query_key_value.bias": "model-00001-of-00002.safetensors",
346
+ "transformer.encoder.layers.24.self_attention.query_key_value.weight": "model-00001-of-00002.safetensors",
347
+ "transformer.encoder.layers.24.self_attention.query_key_value.weight.absmax": "model-00001-of-00002.safetensors",
348
+ "transformer.encoder.layers.24.self_attention.query_key_value.weight.quant_map": "model-00001-of-00002.safetensors",
349
+ "transformer.encoder.layers.24.self_attention.query_key_value.weight.quant_state.bitsandbytes__fp4": "model-00001-of-00002.safetensors",
350
+ "transformer.encoder.layers.25.input_layernorm.weight": "model-00001-of-00002.safetensors",
351
+ "transformer.encoder.layers.25.mlp.dense_4h_to_h.weight": "model-00001-of-00002.safetensors",
352
+ "transformer.encoder.layers.25.mlp.dense_4h_to_h.weight.absmax": "model-00001-of-00002.safetensors",
353
+ "transformer.encoder.layers.25.mlp.dense_4h_to_h.weight.quant_map": "model-00001-of-00002.safetensors",
354
+ "transformer.encoder.layers.25.mlp.dense_4h_to_h.weight.quant_state.bitsandbytes__fp4": "model-00001-of-00002.safetensors",
355
+ "transformer.encoder.layers.25.mlp.dense_h_to_4h.weight": "model-00001-of-00002.safetensors",
356
+ "transformer.encoder.layers.25.mlp.dense_h_to_4h.weight.absmax": "model-00001-of-00002.safetensors",
357
+ "transformer.encoder.layers.25.mlp.dense_h_to_4h.weight.quant_map": "model-00001-of-00002.safetensors",
358
+ "transformer.encoder.layers.25.mlp.dense_h_to_4h.weight.quant_state.bitsandbytes__fp4": "model-00001-of-00002.safetensors",
359
+ "transformer.encoder.layers.25.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
360
+ "transformer.encoder.layers.25.self_attention.dense.weight": "model-00001-of-00002.safetensors",
361
+ "transformer.encoder.layers.25.self_attention.dense.weight.absmax": "model-00001-of-00002.safetensors",
362
+ "transformer.encoder.layers.25.self_attention.dense.weight.quant_map": "model-00001-of-00002.safetensors",
363
+ "transformer.encoder.layers.25.self_attention.dense.weight.quant_state.bitsandbytes__fp4": "model-00001-of-00002.safetensors",
364
+ "transformer.encoder.layers.25.self_attention.query_key_value.bias": "model-00001-of-00002.safetensors",
365
+ "transformer.encoder.layers.25.self_attention.query_key_value.weight": "model-00001-of-00002.safetensors",
366
+ "transformer.encoder.layers.25.self_attention.query_key_value.weight.absmax": "model-00001-of-00002.safetensors",
367
+ "transformer.encoder.layers.25.self_attention.query_key_value.weight.quant_map": "model-00001-of-00002.safetensors",
368
+ "transformer.encoder.layers.25.self_attention.query_key_value.weight.quant_state.bitsandbytes__fp4": "model-00001-of-00002.safetensors",
369
+ "transformer.encoder.layers.26.input_layernorm.weight": "model-00001-of-00002.safetensors",
370
+ "transformer.encoder.layers.26.mlp.dense_4h_to_h.weight": "model-00001-of-00002.safetensors",
371
+ "transformer.encoder.layers.26.mlp.dense_4h_to_h.weight.absmax": "model-00001-of-00002.safetensors",
372
+ "transformer.encoder.layers.26.mlp.dense_4h_to_h.weight.quant_map": "model-00001-of-00002.safetensors",
373
+ "transformer.encoder.layers.26.mlp.dense_4h_to_h.weight.quant_state.bitsandbytes__fp4": "model-00001-of-00002.safetensors",
374
+ "transformer.encoder.layers.26.mlp.dense_h_to_4h.weight": "model-00001-of-00002.safetensors",
375
+ "transformer.encoder.layers.26.mlp.dense_h_to_4h.weight.absmax": "model-00001-of-00002.safetensors",
376
+ "transformer.encoder.layers.26.mlp.dense_h_to_4h.weight.quant_map": "model-00001-of-00002.safetensors",
377
+ "transformer.encoder.layers.26.mlp.dense_h_to_4h.weight.quant_state.bitsandbytes__fp4": "model-00001-of-00002.safetensors",
378
+ "transformer.encoder.layers.26.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
379
+ "transformer.encoder.layers.26.self_attention.dense.weight": "model-00001-of-00002.safetensors",
380
+ "transformer.encoder.layers.26.self_attention.dense.weight.absmax": "model-00001-of-00002.safetensors",
381
+ "transformer.encoder.layers.26.self_attention.dense.weight.quant_map": "model-00001-of-00002.safetensors",
382
+ "transformer.encoder.layers.26.self_attention.dense.weight.quant_state.bitsandbytes__fp4": "model-00001-of-00002.safetensors",
383
+ "transformer.encoder.layers.26.self_attention.query_key_value.bias": "model-00001-of-00002.safetensors",
384
+ "transformer.encoder.layers.26.self_attention.query_key_value.weight": "model-00001-of-00002.safetensors",
385
+ "transformer.encoder.layers.26.self_attention.query_key_value.weight.absmax": "model-00001-of-00002.safetensors",
386
+ "transformer.encoder.layers.26.self_attention.query_key_value.weight.quant_map": "model-00001-of-00002.safetensors",
387
+ "transformer.encoder.layers.26.self_attention.query_key_value.weight.quant_state.bitsandbytes__fp4": "model-00001-of-00002.safetensors",
388
+ "transformer.encoder.layers.27.input_layernorm.weight": "model-00001-of-00002.safetensors",
389
+ "transformer.encoder.layers.27.mlp.dense_4h_to_h.weight": "model-00001-of-00002.safetensors",
390
+ "transformer.encoder.layers.27.mlp.dense_4h_to_h.weight.absmax": "model-00001-of-00002.safetensors",
391
+ "transformer.encoder.layers.27.mlp.dense_4h_to_h.weight.quant_map": "model-00001-of-00002.safetensors",
392
+ "transformer.encoder.layers.27.mlp.dense_4h_to_h.weight.quant_state.bitsandbytes__fp4": "model-00001-of-00002.safetensors",
393
+ "transformer.encoder.layers.27.mlp.dense_h_to_4h.weight": "model-00001-of-00002.safetensors",
394
+ "transformer.encoder.layers.27.mlp.dense_h_to_4h.weight.absmax": "model-00001-of-00002.safetensors",
395
+ "transformer.encoder.layers.27.mlp.dense_h_to_4h.weight.quant_map": "model-00001-of-00002.safetensors",
396
+ "transformer.encoder.layers.27.mlp.dense_h_to_4h.weight.quant_state.bitsandbytes__fp4": "model-00001-of-00002.safetensors",
397
+ "transformer.encoder.layers.27.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
398
+ "transformer.encoder.layers.27.self_attention.dense.weight": "model-00001-of-00002.safetensors",
399
+ "transformer.encoder.layers.27.self_attention.dense.weight.absmax": "model-00001-of-00002.safetensors",
400
+ "transformer.encoder.layers.27.self_attention.dense.weight.quant_map": "model-00001-of-00002.safetensors",
401
+ "transformer.encoder.layers.27.self_attention.dense.weight.quant_state.bitsandbytes__fp4": "model-00001-of-00002.safetensors",
402
+ "transformer.encoder.layers.27.self_attention.query_key_value.bias": "model-00001-of-00002.safetensors",
403
+ "transformer.encoder.layers.27.self_attention.query_key_value.weight": "model-00001-of-00002.safetensors",
404
+ "transformer.encoder.layers.27.self_attention.query_key_value.weight.absmax": "model-00001-of-00002.safetensors",
405
+ "transformer.encoder.layers.27.self_attention.query_key_value.weight.quant_map": "model-00001-of-00002.safetensors",
406
+ "transformer.encoder.layers.27.self_attention.query_key_value.weight.quant_state.bitsandbytes__fp4": "model-00001-of-00002.safetensors",
407
+ "transformer.encoder.layers.28.input_layernorm.weight": "model-00001-of-00002.safetensors",
408
+ "transformer.encoder.layers.28.mlp.dense_4h_to_h.weight": "model-00001-of-00002.safetensors",
409
+ "transformer.encoder.layers.28.mlp.dense_4h_to_h.weight.absmax": "model-00001-of-00002.safetensors",
410
+ "transformer.encoder.layers.28.mlp.dense_4h_to_h.weight.quant_map": "model-00001-of-00002.safetensors",
411
+ "transformer.encoder.layers.28.mlp.dense_4h_to_h.weight.quant_state.bitsandbytes__fp4": "model-00001-of-00002.safetensors",
412
+ "transformer.encoder.layers.28.mlp.dense_h_to_4h.weight": "model-00001-of-00002.safetensors",
413
+ "transformer.encoder.layers.28.mlp.dense_h_to_4h.weight.absmax": "model-00001-of-00002.safetensors",
414
+ "transformer.encoder.layers.28.mlp.dense_h_to_4h.weight.quant_map": "model-00001-of-00002.safetensors",
415
+ "transformer.encoder.layers.28.mlp.dense_h_to_4h.weight.quant_state.bitsandbytes__fp4": "model-00001-of-00002.safetensors",
416
+ "transformer.encoder.layers.28.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
417
+ "transformer.encoder.layers.28.self_attention.dense.weight": "model-00001-of-00002.safetensors",
418
+ "transformer.encoder.layers.28.self_attention.dense.weight.absmax": "model-00001-of-00002.safetensors",
419
+ "transformer.encoder.layers.28.self_attention.dense.weight.quant_map": "model-00001-of-00002.safetensors",
420
+ "transformer.encoder.layers.28.self_attention.dense.weight.quant_state.bitsandbytes__fp4": "model-00001-of-00002.safetensors",
421
+ "transformer.encoder.layers.28.self_attention.query_key_value.bias": "model-00001-of-00002.safetensors",
422
+ "transformer.encoder.layers.28.self_attention.query_key_value.weight": "model-00001-of-00002.safetensors",
423
+ "transformer.encoder.layers.28.self_attention.query_key_value.weight.absmax": "model-00001-of-00002.safetensors",
424
+ "transformer.encoder.layers.28.self_attention.query_key_value.weight.quant_map": "model-00001-of-00002.safetensors",
425
+ "transformer.encoder.layers.28.self_attention.query_key_value.weight.quant_state.bitsandbytes__fp4": "model-00001-of-00002.safetensors",
426
+ "transformer.encoder.layers.29.input_layernorm.weight": "model-00001-of-00002.safetensors",
427
+ "transformer.encoder.layers.29.mlp.dense_4h_to_h.weight": "model-00001-of-00002.safetensors",
428
+ "transformer.encoder.layers.29.mlp.dense_4h_to_h.weight.absmax": "model-00001-of-00002.safetensors",
429
+ "transformer.encoder.layers.29.mlp.dense_4h_to_h.weight.quant_map": "model-00001-of-00002.safetensors",
430
+ "transformer.encoder.layers.29.mlp.dense_4h_to_h.weight.quant_state.bitsandbytes__fp4": "model-00001-of-00002.safetensors",
431
+ "transformer.encoder.layers.29.mlp.dense_h_to_4h.weight": "model-00001-of-00002.safetensors",
432
+ "transformer.encoder.layers.29.mlp.dense_h_to_4h.weight.absmax": "model-00001-of-00002.safetensors",
433
+ "transformer.encoder.layers.29.mlp.dense_h_to_4h.weight.quant_map": "model-00001-of-00002.safetensors",
434
+ "transformer.encoder.layers.29.mlp.dense_h_to_4h.weight.quant_state.bitsandbytes__fp4": "model-00001-of-00002.safetensors",
435
+ "transformer.encoder.layers.29.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
436
+ "transformer.encoder.layers.29.self_attention.dense.weight": "model-00001-of-00002.safetensors",
437
+ "transformer.encoder.layers.29.self_attention.dense.weight.absmax": "model-00001-of-00002.safetensors",
438
+ "transformer.encoder.layers.29.self_attention.dense.weight.quant_map": "model-00001-of-00002.safetensors",
439
+ "transformer.encoder.layers.29.self_attention.dense.weight.quant_state.bitsandbytes__fp4": "model-00001-of-00002.safetensors",
440
+ "transformer.encoder.layers.29.self_attention.query_key_value.bias": "model-00001-of-00002.safetensors",
441
+ "transformer.encoder.layers.29.self_attention.query_key_value.weight": "model-00001-of-00002.safetensors",
442
+ "transformer.encoder.layers.29.self_attention.query_key_value.weight.absmax": "model-00001-of-00002.safetensors",
443
+ "transformer.encoder.layers.29.self_attention.query_key_value.weight.quant_map": "model-00001-of-00002.safetensors",
444
+ "transformer.encoder.layers.29.self_attention.query_key_value.weight.quant_state.bitsandbytes__fp4": "model-00001-of-00002.safetensors",
445
+ "transformer.encoder.layers.3.input_layernorm.weight": "model-00001-of-00002.safetensors",
446
+ "transformer.encoder.layers.3.mlp.dense_4h_to_h.weight": "model-00001-of-00002.safetensors",
447
+ "transformer.encoder.layers.3.mlp.dense_4h_to_h.weight.absmax": "model-00001-of-00002.safetensors",
448
+ "transformer.encoder.layers.3.mlp.dense_4h_to_h.weight.quant_map": "model-00001-of-00002.safetensors",
449
+ "transformer.encoder.layers.3.mlp.dense_4h_to_h.weight.quant_state.bitsandbytes__fp4": "model-00001-of-00002.safetensors",
450
+ "transformer.encoder.layers.3.mlp.dense_h_to_4h.weight": "model-00001-of-00002.safetensors",
451
+ "transformer.encoder.layers.3.mlp.dense_h_to_4h.weight.absmax": "model-00001-of-00002.safetensors",
452
+ "transformer.encoder.layers.3.mlp.dense_h_to_4h.weight.quant_map": "model-00001-of-00002.safetensors",
453
+ "transformer.encoder.layers.3.mlp.dense_h_to_4h.weight.quant_state.bitsandbytes__fp4": "model-00001-of-00002.safetensors",
454
+ "transformer.encoder.layers.3.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
455
+ "transformer.encoder.layers.3.self_attention.dense.weight": "model-00001-of-00002.safetensors",
456
+ "transformer.encoder.layers.3.self_attention.dense.weight.absmax": "model-00001-of-00002.safetensors",
457
+ "transformer.encoder.layers.3.self_attention.dense.weight.quant_map": "model-00001-of-00002.safetensors",
458
+ "transformer.encoder.layers.3.self_attention.dense.weight.quant_state.bitsandbytes__fp4": "model-00001-of-00002.safetensors",
459
+ "transformer.encoder.layers.3.self_attention.query_key_value.bias": "model-00001-of-00002.safetensors",
460
+ "transformer.encoder.layers.3.self_attention.query_key_value.weight": "model-00001-of-00002.safetensors",
461
+ "transformer.encoder.layers.3.self_attention.query_key_value.weight.absmax": "model-00001-of-00002.safetensors",
462
+ "transformer.encoder.layers.3.self_attention.query_key_value.weight.quant_map": "model-00001-of-00002.safetensors",
463
+ "transformer.encoder.layers.3.self_attention.query_key_value.weight.quant_state.bitsandbytes__fp4": "model-00001-of-00002.safetensors",
464
+ "transformer.encoder.layers.30.input_layernorm.weight": "model-00001-of-00002.safetensors",
465
+ "transformer.encoder.layers.30.mlp.dense_4h_to_h.weight": "model-00001-of-00002.safetensors",
466
+ "transformer.encoder.layers.30.mlp.dense_4h_to_h.weight.absmax": "model-00001-of-00002.safetensors",
467
+ "transformer.encoder.layers.30.mlp.dense_4h_to_h.weight.quant_map": "model-00001-of-00002.safetensors",
468
+ "transformer.encoder.layers.30.mlp.dense_4h_to_h.weight.quant_state.bitsandbytes__fp4": "model-00001-of-00002.safetensors",
469
+ "transformer.encoder.layers.30.mlp.dense_h_to_4h.weight": "model-00001-of-00002.safetensors",
470
+ "transformer.encoder.layers.30.mlp.dense_h_to_4h.weight.absmax": "model-00001-of-00002.safetensors",
471
+ "transformer.encoder.layers.30.mlp.dense_h_to_4h.weight.quant_map": "model-00001-of-00002.safetensors",
472
+ "transformer.encoder.layers.30.mlp.dense_h_to_4h.weight.quant_state.bitsandbytes__fp4": "model-00001-of-00002.safetensors",
473
+ "transformer.encoder.layers.30.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
474
+ "transformer.encoder.layers.30.self_attention.dense.weight": "model-00001-of-00002.safetensors",
475
+ "transformer.encoder.layers.30.self_attention.dense.weight.absmax": "model-00001-of-00002.safetensors",
476
+ "transformer.encoder.layers.30.self_attention.dense.weight.quant_map": "model-00001-of-00002.safetensors",
477
+ "transformer.encoder.layers.30.self_attention.dense.weight.quant_state.bitsandbytes__fp4": "model-00001-of-00002.safetensors",
478
+ "transformer.encoder.layers.30.self_attention.query_key_value.bias": "model-00001-of-00002.safetensors",
479
+ "transformer.encoder.layers.30.self_attention.query_key_value.weight": "model-00001-of-00002.safetensors",
480
+ "transformer.encoder.layers.30.self_attention.query_key_value.weight.absmax": "model-00001-of-00002.safetensors",
481
+ "transformer.encoder.layers.30.self_attention.query_key_value.weight.quant_map": "model-00001-of-00002.safetensors",
482
+ "transformer.encoder.layers.30.self_attention.query_key_value.weight.quant_state.bitsandbytes__fp4": "model-00001-of-00002.safetensors",
483
+ "transformer.encoder.layers.31.input_layernorm.weight": "model-00001-of-00002.safetensors",
484
+ "transformer.encoder.layers.31.mlp.dense_4h_to_h.weight": "model-00001-of-00002.safetensors",
485
+ "transformer.encoder.layers.31.mlp.dense_4h_to_h.weight.absmax": "model-00001-of-00002.safetensors",
486
+ "transformer.encoder.layers.31.mlp.dense_4h_to_h.weight.quant_map": "model-00001-of-00002.safetensors",
487
+ "transformer.encoder.layers.31.mlp.dense_4h_to_h.weight.quant_state.bitsandbytes__fp4": "model-00001-of-00002.safetensors",
488
+ "transformer.encoder.layers.31.mlp.dense_h_to_4h.weight": "model-00001-of-00002.safetensors",
489
+ "transformer.encoder.layers.31.mlp.dense_h_to_4h.weight.absmax": "model-00001-of-00002.safetensors",
490
+ "transformer.encoder.layers.31.mlp.dense_h_to_4h.weight.quant_map": "model-00001-of-00002.safetensors",
491
+ "transformer.encoder.layers.31.mlp.dense_h_to_4h.weight.quant_state.bitsandbytes__fp4": "model-00001-of-00002.safetensors",
492
+ "transformer.encoder.layers.31.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
493
+ "transformer.encoder.layers.31.self_attention.dense.weight": "model-00001-of-00002.safetensors",
494
+ "transformer.encoder.layers.31.self_attention.dense.weight.absmax": "model-00001-of-00002.safetensors",
495
+ "transformer.encoder.layers.31.self_attention.dense.weight.quant_map": "model-00001-of-00002.safetensors",
496
+ "transformer.encoder.layers.31.self_attention.dense.weight.quant_state.bitsandbytes__fp4": "model-00001-of-00002.safetensors",
497
+ "transformer.encoder.layers.31.self_attention.query_key_value.bias": "model-00001-of-00002.safetensors",
498
+ "transformer.encoder.layers.31.self_attention.query_key_value.weight": "model-00001-of-00002.safetensors",
499
+ "transformer.encoder.layers.31.self_attention.query_key_value.weight.absmax": "model-00001-of-00002.safetensors",
500
+ "transformer.encoder.layers.31.self_attention.query_key_value.weight.quant_map": "model-00001-of-00002.safetensors",
501
+ "transformer.encoder.layers.31.self_attention.query_key_value.weight.quant_state.bitsandbytes__fp4": "model-00001-of-00002.safetensors",
502
+ "transformer.encoder.layers.32.input_layernorm.weight": "model-00001-of-00002.safetensors",
503
+ "transformer.encoder.layers.32.mlp.dense_4h_to_h.weight": "model-00002-of-00002.safetensors",
504
+ "transformer.encoder.layers.32.mlp.dense_4h_to_h.weight.absmax": "model-00002-of-00002.safetensors",
505
+ "transformer.encoder.layers.32.mlp.dense_4h_to_h.weight.quant_map": "model-00002-of-00002.safetensors",
506
+ "transformer.encoder.layers.32.mlp.dense_4h_to_h.weight.quant_state.bitsandbytes__fp4": "model-00002-of-00002.safetensors",
507
+ "transformer.encoder.layers.32.mlp.dense_h_to_4h.weight": "model-00001-of-00002.safetensors",
508
+ "transformer.encoder.layers.32.mlp.dense_h_to_4h.weight.absmax": "model-00001-of-00002.safetensors",
509
+ "transformer.encoder.layers.32.mlp.dense_h_to_4h.weight.quant_map": "model-00001-of-00002.safetensors",
510
+ "transformer.encoder.layers.32.mlp.dense_h_to_4h.weight.quant_state.bitsandbytes__fp4": "model-00001-of-00002.safetensors",
511
+ "transformer.encoder.layers.32.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
512
+ "transformer.encoder.layers.32.self_attention.dense.weight": "model-00001-of-00002.safetensors",
513
+ "transformer.encoder.layers.32.self_attention.dense.weight.absmax": "model-00001-of-00002.safetensors",
514
+ "transformer.encoder.layers.32.self_attention.dense.weight.quant_map": "model-00001-of-00002.safetensors",
515
+ "transformer.encoder.layers.32.self_attention.dense.weight.quant_state.bitsandbytes__fp4": "model-00001-of-00002.safetensors",
516
+ "transformer.encoder.layers.32.self_attention.query_key_value.bias": "model-00001-of-00002.safetensors",
517
+ "transformer.encoder.layers.32.self_attention.query_key_value.weight": "model-00001-of-00002.safetensors",
518
+ "transformer.encoder.layers.32.self_attention.query_key_value.weight.absmax": "model-00001-of-00002.safetensors",
519
+ "transformer.encoder.layers.32.self_attention.query_key_value.weight.quant_map": "model-00001-of-00002.safetensors",
520
+ "transformer.encoder.layers.32.self_attention.query_key_value.weight.quant_state.bitsandbytes__fp4": "model-00001-of-00002.safetensors",
521
+ "transformer.encoder.layers.33.input_layernorm.weight": "model-00002-of-00002.safetensors",
522
+ "transformer.encoder.layers.33.mlp.dense_4h_to_h.weight": "model-00002-of-00002.safetensors",
523
+ "transformer.encoder.layers.33.mlp.dense_4h_to_h.weight.absmax": "model-00002-of-00002.safetensors",
524
+ "transformer.encoder.layers.33.mlp.dense_4h_to_h.weight.quant_map": "model-00002-of-00002.safetensors",
525
+ "transformer.encoder.layers.33.mlp.dense_4h_to_h.weight.quant_state.bitsandbytes__fp4": "model-00002-of-00002.safetensors",
526
+ "transformer.encoder.layers.33.mlp.dense_h_to_4h.weight": "model-00002-of-00002.safetensors",
527
+ "transformer.encoder.layers.33.mlp.dense_h_to_4h.weight.absmax": "model-00002-of-00002.safetensors",
528
+ "transformer.encoder.layers.33.mlp.dense_h_to_4h.weight.quant_map": "model-00002-of-00002.safetensors",
529
+ "transformer.encoder.layers.33.mlp.dense_h_to_4h.weight.quant_state.bitsandbytes__fp4": "model-00002-of-00002.safetensors",
530
+ "transformer.encoder.layers.33.post_attention_layernorm.weight": "model-00002-of-00002.safetensors",
531
+ "transformer.encoder.layers.33.self_attention.dense.weight": "model-00002-of-00002.safetensors",
532
+ "transformer.encoder.layers.33.self_attention.dense.weight.absmax": "model-00002-of-00002.safetensors",
533
+ "transformer.encoder.layers.33.self_attention.dense.weight.quant_map": "model-00002-of-00002.safetensors",
534
+ "transformer.encoder.layers.33.self_attention.dense.weight.quant_state.bitsandbytes__fp4": "model-00002-of-00002.safetensors",
535
+ "transformer.encoder.layers.33.self_attention.query_key_value.bias": "model-00002-of-00002.safetensors",
536
+ "transformer.encoder.layers.33.self_attention.query_key_value.weight": "model-00002-of-00002.safetensors",
537
+ "transformer.encoder.layers.33.self_attention.query_key_value.weight.absmax": "model-00002-of-00002.safetensors",
538
+ "transformer.encoder.layers.33.self_attention.query_key_value.weight.quant_map": "model-00002-of-00002.safetensors",
539
+ "transformer.encoder.layers.33.self_attention.query_key_value.weight.quant_state.bitsandbytes__fp4": "model-00002-of-00002.safetensors",
540
+ "transformer.encoder.layers.34.input_layernorm.weight": "model-00002-of-00002.safetensors",
541
+ "transformer.encoder.layers.34.mlp.dense_4h_to_h.weight": "model-00002-of-00002.safetensors",
542
+ "transformer.encoder.layers.34.mlp.dense_4h_to_h.weight.absmax": "model-00002-of-00002.safetensors",
543
+ "transformer.encoder.layers.34.mlp.dense_4h_to_h.weight.quant_map": "model-00002-of-00002.safetensors",
544
+ "transformer.encoder.layers.34.mlp.dense_4h_to_h.weight.quant_state.bitsandbytes__fp4": "model-00002-of-00002.safetensors",
545
+ "transformer.encoder.layers.34.mlp.dense_h_to_4h.weight": "model-00002-of-00002.safetensors",
546
+ "transformer.encoder.layers.34.mlp.dense_h_to_4h.weight.absmax": "model-00002-of-00002.safetensors",
547
+ "transformer.encoder.layers.34.mlp.dense_h_to_4h.weight.quant_map": "model-00002-of-00002.safetensors",
548
+ "transformer.encoder.layers.34.mlp.dense_h_to_4h.weight.quant_state.bitsandbytes__fp4": "model-00002-of-00002.safetensors",
549
+ "transformer.encoder.layers.34.post_attention_layernorm.weight": "model-00002-of-00002.safetensors",
550
+ "transformer.encoder.layers.34.self_attention.dense.weight": "model-00002-of-00002.safetensors",
551
+ "transformer.encoder.layers.34.self_attention.dense.weight.absmax": "model-00002-of-00002.safetensors",
552
+ "transformer.encoder.layers.34.self_attention.dense.weight.quant_map": "model-00002-of-00002.safetensors",
553
+ "transformer.encoder.layers.34.self_attention.dense.weight.quant_state.bitsandbytes__fp4": "model-00002-of-00002.safetensors",
554
+ "transformer.encoder.layers.34.self_attention.query_key_value.bias": "model-00002-of-00002.safetensors",
555
+ "transformer.encoder.layers.34.self_attention.query_key_value.weight": "model-00002-of-00002.safetensors",
556
+ "transformer.encoder.layers.34.self_attention.query_key_value.weight.absmax": "model-00002-of-00002.safetensors",
557
+ "transformer.encoder.layers.34.self_attention.query_key_value.weight.quant_map": "model-00002-of-00002.safetensors",
558
+ "transformer.encoder.layers.34.self_attention.query_key_value.weight.quant_state.bitsandbytes__fp4": "model-00002-of-00002.safetensors",
559
+ "transformer.encoder.layers.35.input_layernorm.weight": "model-00002-of-00002.safetensors",
560
+ "transformer.encoder.layers.35.mlp.dense_4h_to_h.weight": "model-00002-of-00002.safetensors",
561
+ "transformer.encoder.layers.35.mlp.dense_4h_to_h.weight.absmax": "model-00002-of-00002.safetensors",
562
+ "transformer.encoder.layers.35.mlp.dense_4h_to_h.weight.quant_map": "model-00002-of-00002.safetensors",
563
+ "transformer.encoder.layers.35.mlp.dense_4h_to_h.weight.quant_state.bitsandbytes__fp4": "model-00002-of-00002.safetensors",
564
+ "transformer.encoder.layers.35.mlp.dense_h_to_4h.weight": "model-00002-of-00002.safetensors",
565
+ "transformer.encoder.layers.35.mlp.dense_h_to_4h.weight.absmax": "model-00002-of-00002.safetensors",
566
+ "transformer.encoder.layers.35.mlp.dense_h_to_4h.weight.quant_map": "model-00002-of-00002.safetensors",
567
+ "transformer.encoder.layers.35.mlp.dense_h_to_4h.weight.quant_state.bitsandbytes__fp4": "model-00002-of-00002.safetensors",
568
+ "transformer.encoder.layers.35.post_attention_layernorm.weight": "model-00002-of-00002.safetensors",
569
+ "transformer.encoder.layers.35.self_attention.dense.weight": "model-00002-of-00002.safetensors",
570
+ "transformer.encoder.layers.35.self_attention.dense.weight.absmax": "model-00002-of-00002.safetensors",
571
+ "transformer.encoder.layers.35.self_attention.dense.weight.quant_map": "model-00002-of-00002.safetensors",
572
+ "transformer.encoder.layers.35.self_attention.dense.weight.quant_state.bitsandbytes__fp4": "model-00002-of-00002.safetensors",
573
+ "transformer.encoder.layers.35.self_attention.query_key_value.bias": "model-00002-of-00002.safetensors",
574
+ "transformer.encoder.layers.35.self_attention.query_key_value.weight": "model-00002-of-00002.safetensors",
575
+ "transformer.encoder.layers.35.self_attention.query_key_value.weight.absmax": "model-00002-of-00002.safetensors",
576
+ "transformer.encoder.layers.35.self_attention.query_key_value.weight.quant_map": "model-00002-of-00002.safetensors",
577
+ "transformer.encoder.layers.35.self_attention.query_key_value.weight.quant_state.bitsandbytes__fp4": "model-00002-of-00002.safetensors",
578
+ "transformer.encoder.layers.36.input_layernorm.weight": "model-00002-of-00002.safetensors",
579
+ "transformer.encoder.layers.36.mlp.dense_4h_to_h.weight": "model-00002-of-00002.safetensors",
580
+ "transformer.encoder.layers.36.mlp.dense_4h_to_h.weight.absmax": "model-00002-of-00002.safetensors",
581
+ "transformer.encoder.layers.36.mlp.dense_4h_to_h.weight.quant_map": "model-00002-of-00002.safetensors",
582
+ "transformer.encoder.layers.36.mlp.dense_4h_to_h.weight.quant_state.bitsandbytes__fp4": "model-00002-of-00002.safetensors",
583
+ "transformer.encoder.layers.36.mlp.dense_h_to_4h.weight": "model-00002-of-00002.safetensors",
584
+ "transformer.encoder.layers.36.mlp.dense_h_to_4h.weight.absmax": "model-00002-of-00002.safetensors",
585
+ "transformer.encoder.layers.36.mlp.dense_h_to_4h.weight.quant_map": "model-00002-of-00002.safetensors",
586
+ "transformer.encoder.layers.36.mlp.dense_h_to_4h.weight.quant_state.bitsandbytes__fp4": "model-00002-of-00002.safetensors",
587
+ "transformer.encoder.layers.36.post_attention_layernorm.weight": "model-00002-of-00002.safetensors",
588
+ "transformer.encoder.layers.36.self_attention.dense.weight": "model-00002-of-00002.safetensors",
589
+ "transformer.encoder.layers.36.self_attention.dense.weight.absmax": "model-00002-of-00002.safetensors",
590
+ "transformer.encoder.layers.36.self_attention.dense.weight.quant_map": "model-00002-of-00002.safetensors",
591
+ "transformer.encoder.layers.36.self_attention.dense.weight.quant_state.bitsandbytes__fp4": "model-00002-of-00002.safetensors",
592
+ "transformer.encoder.layers.36.self_attention.query_key_value.bias": "model-00002-of-00002.safetensors",
593
+ "transformer.encoder.layers.36.self_attention.query_key_value.weight": "model-00002-of-00002.safetensors",
594
+ "transformer.encoder.layers.36.self_attention.query_key_value.weight.absmax": "model-00002-of-00002.safetensors",
595
+ "transformer.encoder.layers.36.self_attention.query_key_value.weight.quant_map": "model-00002-of-00002.safetensors",
596
+ "transformer.encoder.layers.36.self_attention.query_key_value.weight.quant_state.bitsandbytes__fp4": "model-00002-of-00002.safetensors",
597
+ "transformer.encoder.layers.37.input_layernorm.weight": "model-00002-of-00002.safetensors",
598
+ "transformer.encoder.layers.37.mlp.dense_4h_to_h.weight": "model-00002-of-00002.safetensors",
599
+ "transformer.encoder.layers.37.mlp.dense_4h_to_h.weight.absmax": "model-00002-of-00002.safetensors",
600
+ "transformer.encoder.layers.37.mlp.dense_4h_to_h.weight.quant_map": "model-00002-of-00002.safetensors",
601
+ "transformer.encoder.layers.37.mlp.dense_4h_to_h.weight.quant_state.bitsandbytes__fp4": "model-00002-of-00002.safetensors",
602
+ "transformer.encoder.layers.37.mlp.dense_h_to_4h.weight": "model-00002-of-00002.safetensors",
603
+ "transformer.encoder.layers.37.mlp.dense_h_to_4h.weight.absmax": "model-00002-of-00002.safetensors",
604
+ "transformer.encoder.layers.37.mlp.dense_h_to_4h.weight.quant_map": "model-00002-of-00002.safetensors",
605
+ "transformer.encoder.layers.37.mlp.dense_h_to_4h.weight.quant_state.bitsandbytes__fp4": "model-00002-of-00002.safetensors",
606
+ "transformer.encoder.layers.37.post_attention_layernorm.weight": "model-00002-of-00002.safetensors",
607
+ "transformer.encoder.layers.37.self_attention.dense.weight": "model-00002-of-00002.safetensors",
608
+ "transformer.encoder.layers.37.self_attention.dense.weight.absmax": "model-00002-of-00002.safetensors",
609
+ "transformer.encoder.layers.37.self_attention.dense.weight.quant_map": "model-00002-of-00002.safetensors",
610
+ "transformer.encoder.layers.37.self_attention.dense.weight.quant_state.bitsandbytes__fp4": "model-00002-of-00002.safetensors",
611
+ "transformer.encoder.layers.37.self_attention.query_key_value.bias": "model-00002-of-00002.safetensors",
612
+ "transformer.encoder.layers.37.self_attention.query_key_value.weight": "model-00002-of-00002.safetensors",
613
+ "transformer.encoder.layers.37.self_attention.query_key_value.weight.absmax": "model-00002-of-00002.safetensors",
614
+ "transformer.encoder.layers.37.self_attention.query_key_value.weight.quant_map": "model-00002-of-00002.safetensors",
615
+ "transformer.encoder.layers.37.self_attention.query_key_value.weight.quant_state.bitsandbytes__fp4": "model-00002-of-00002.safetensors",
616
+ "transformer.encoder.layers.38.input_layernorm.weight": "model-00002-of-00002.safetensors",
617
+ "transformer.encoder.layers.38.mlp.dense_4h_to_h.weight": "model-00002-of-00002.safetensors",
618
+ "transformer.encoder.layers.38.mlp.dense_4h_to_h.weight.absmax": "model-00002-of-00002.safetensors",
619
+ "transformer.encoder.layers.38.mlp.dense_4h_to_h.weight.quant_map": "model-00002-of-00002.safetensors",
620
+ "transformer.encoder.layers.38.mlp.dense_4h_to_h.weight.quant_state.bitsandbytes__fp4": "model-00002-of-00002.safetensors",
621
+ "transformer.encoder.layers.38.mlp.dense_h_to_4h.weight": "model-00002-of-00002.safetensors",
622
+ "transformer.encoder.layers.38.mlp.dense_h_to_4h.weight.absmax": "model-00002-of-00002.safetensors",
623
+ "transformer.encoder.layers.38.mlp.dense_h_to_4h.weight.quant_map": "model-00002-of-00002.safetensors",
624
+ "transformer.encoder.layers.38.mlp.dense_h_to_4h.weight.quant_state.bitsandbytes__fp4": "model-00002-of-00002.safetensors",
625
+ "transformer.encoder.layers.38.post_attention_layernorm.weight": "model-00002-of-00002.safetensors",
626
+ "transformer.encoder.layers.38.self_attention.dense.weight": "model-00002-of-00002.safetensors",
627
+ "transformer.encoder.layers.38.self_attention.dense.weight.absmax": "model-00002-of-00002.safetensors",
628
+ "transformer.encoder.layers.38.self_attention.dense.weight.quant_map": "model-00002-of-00002.safetensors",
629
+ "transformer.encoder.layers.38.self_attention.dense.weight.quant_state.bitsandbytes__fp4": "model-00002-of-00002.safetensors",
630
+ "transformer.encoder.layers.38.self_attention.query_key_value.bias": "model-00002-of-00002.safetensors",
631
+ "transformer.encoder.layers.38.self_attention.query_key_value.weight": "model-00002-of-00002.safetensors",
632
+ "transformer.encoder.layers.38.self_attention.query_key_value.weight.absmax": "model-00002-of-00002.safetensors",
633
+ "transformer.encoder.layers.38.self_attention.query_key_value.weight.quant_map": "model-00002-of-00002.safetensors",
634
+ "transformer.encoder.layers.38.self_attention.query_key_value.weight.quant_state.bitsandbytes__fp4": "model-00002-of-00002.safetensors",
635
+ "transformer.encoder.layers.39.input_layernorm.weight": "model-00002-of-00002.safetensors",
636
+ "transformer.encoder.layers.39.mlp.dense_4h_to_h.weight": "model-00002-of-00002.safetensors",
637
+ "transformer.encoder.layers.39.mlp.dense_4h_to_h.weight.absmax": "model-00002-of-00002.safetensors",
638
+ "transformer.encoder.layers.39.mlp.dense_4h_to_h.weight.quant_map": "model-00002-of-00002.safetensors",
639
+ "transformer.encoder.layers.39.mlp.dense_4h_to_h.weight.quant_state.bitsandbytes__fp4": "model-00002-of-00002.safetensors",
640
+ "transformer.encoder.layers.39.mlp.dense_h_to_4h.weight": "model-00002-of-00002.safetensors",
641
+ "transformer.encoder.layers.39.mlp.dense_h_to_4h.weight.absmax": "model-00002-of-00002.safetensors",
642
+ "transformer.encoder.layers.39.mlp.dense_h_to_4h.weight.quant_map": "model-00002-of-00002.safetensors",
643
+ "transformer.encoder.layers.39.mlp.dense_h_to_4h.weight.quant_state.bitsandbytes__fp4": "model-00002-of-00002.safetensors",
644
+ "transformer.encoder.layers.39.post_attention_layernorm.weight": "model-00002-of-00002.safetensors",
645
+ "transformer.encoder.layers.39.self_attention.dense.weight": "model-00002-of-00002.safetensors",
646
+ "transformer.encoder.layers.39.self_attention.dense.weight.absmax": "model-00002-of-00002.safetensors",
647
+ "transformer.encoder.layers.39.self_attention.dense.weight.quant_map": "model-00002-of-00002.safetensors",
648
+ "transformer.encoder.layers.39.self_attention.dense.weight.quant_state.bitsandbytes__fp4": "model-00002-of-00002.safetensors",
649
+ "transformer.encoder.layers.39.self_attention.query_key_value.bias": "model-00002-of-00002.safetensors",
650
+ "transformer.encoder.layers.39.self_attention.query_key_value.weight": "model-00002-of-00002.safetensors",
651
+ "transformer.encoder.layers.39.self_attention.query_key_value.weight.absmax": "model-00002-of-00002.safetensors",
652
+ "transformer.encoder.layers.39.self_attention.query_key_value.weight.quant_map": "model-00002-of-00002.safetensors",
653
+ "transformer.encoder.layers.39.self_attention.query_key_value.weight.quant_state.bitsandbytes__fp4": "model-00002-of-00002.safetensors",
654
+ "transformer.encoder.layers.4.input_layernorm.weight": "model-00001-of-00002.safetensors",
655
+ "transformer.encoder.layers.4.mlp.dense_4h_to_h.weight": "model-00001-of-00002.safetensors",
656
+ "transformer.encoder.layers.4.mlp.dense_4h_to_h.weight.absmax": "model-00001-of-00002.safetensors",
657
+ "transformer.encoder.layers.4.mlp.dense_4h_to_h.weight.quant_map": "model-00001-of-00002.safetensors",
658
+ "transformer.encoder.layers.4.mlp.dense_4h_to_h.weight.quant_state.bitsandbytes__fp4": "model-00001-of-00002.safetensors",
659
+ "transformer.encoder.layers.4.mlp.dense_h_to_4h.weight": "model-00001-of-00002.safetensors",
660
+ "transformer.encoder.layers.4.mlp.dense_h_to_4h.weight.absmax": "model-00001-of-00002.safetensors",
661
+ "transformer.encoder.layers.4.mlp.dense_h_to_4h.weight.quant_map": "model-00001-of-00002.safetensors",
662
+ "transformer.encoder.layers.4.mlp.dense_h_to_4h.weight.quant_state.bitsandbytes__fp4": "model-00001-of-00002.safetensors",
663
+ "transformer.encoder.layers.4.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
664
+ "transformer.encoder.layers.4.self_attention.dense.weight": "model-00001-of-00002.safetensors",
665
+ "transformer.encoder.layers.4.self_attention.dense.weight.absmax": "model-00001-of-00002.safetensors",
666
+ "transformer.encoder.layers.4.self_attention.dense.weight.quant_map": "model-00001-of-00002.safetensors",
667
+ "transformer.encoder.layers.4.self_attention.dense.weight.quant_state.bitsandbytes__fp4": "model-00001-of-00002.safetensors",
668
+ "transformer.encoder.layers.4.self_attention.query_key_value.bias": "model-00001-of-00002.safetensors",
669
+ "transformer.encoder.layers.4.self_attention.query_key_value.weight": "model-00001-of-00002.safetensors",
670
+ "transformer.encoder.layers.4.self_attention.query_key_value.weight.absmax": "model-00001-of-00002.safetensors",
671
+ "transformer.encoder.layers.4.self_attention.query_key_value.weight.quant_map": "model-00001-of-00002.safetensors",
672
+ "transformer.encoder.layers.4.self_attention.query_key_value.weight.quant_state.bitsandbytes__fp4": "model-00001-of-00002.safetensors",
673
+ "transformer.encoder.layers.5.input_layernorm.weight": "model-00001-of-00002.safetensors",
674
+ "transformer.encoder.layers.5.mlp.dense_4h_to_h.weight": "model-00001-of-00002.safetensors",
675
+ "transformer.encoder.layers.5.mlp.dense_4h_to_h.weight.absmax": "model-00001-of-00002.safetensors",
676
+ "transformer.encoder.layers.5.mlp.dense_4h_to_h.weight.quant_map": "model-00001-of-00002.safetensors",
677
+ "transformer.encoder.layers.5.mlp.dense_4h_to_h.weight.quant_state.bitsandbytes__fp4": "model-00001-of-00002.safetensors",
678
+ "transformer.encoder.layers.5.mlp.dense_h_to_4h.weight": "model-00001-of-00002.safetensors",
679
+ "transformer.encoder.layers.5.mlp.dense_h_to_4h.weight.absmax": "model-00001-of-00002.safetensors",
680
+ "transformer.encoder.layers.5.mlp.dense_h_to_4h.weight.quant_map": "model-00001-of-00002.safetensors",
681
+ "transformer.encoder.layers.5.mlp.dense_h_to_4h.weight.quant_state.bitsandbytes__fp4": "model-00001-of-00002.safetensors",
682
+ "transformer.encoder.layers.5.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
683
+ "transformer.encoder.layers.5.self_attention.dense.weight": "model-00001-of-00002.safetensors",
684
+ "transformer.encoder.layers.5.self_attention.dense.weight.absmax": "model-00001-of-00002.safetensors",
685
+ "transformer.encoder.layers.5.self_attention.dense.weight.quant_map": "model-00001-of-00002.safetensors",
686
+ "transformer.encoder.layers.5.self_attention.dense.weight.quant_state.bitsandbytes__fp4": "model-00001-of-00002.safetensors",
687
+ "transformer.encoder.layers.5.self_attention.query_key_value.bias": "model-00001-of-00002.safetensors",
688
+ "transformer.encoder.layers.5.self_attention.query_key_value.weight": "model-00001-of-00002.safetensors",
689
+ "transformer.encoder.layers.5.self_attention.query_key_value.weight.absmax": "model-00001-of-00002.safetensors",
690
+ "transformer.encoder.layers.5.self_attention.query_key_value.weight.quant_map": "model-00001-of-00002.safetensors",
691
+ "transformer.encoder.layers.5.self_attention.query_key_value.weight.quant_state.bitsandbytes__fp4": "model-00001-of-00002.safetensors",
692
+ "transformer.encoder.layers.6.input_layernorm.weight": "model-00001-of-00002.safetensors",
693
+ "transformer.encoder.layers.6.mlp.dense_4h_to_h.weight": "model-00001-of-00002.safetensors",
694
+ "transformer.encoder.layers.6.mlp.dense_4h_to_h.weight.absmax": "model-00001-of-00002.safetensors",
695
+ "transformer.encoder.layers.6.mlp.dense_4h_to_h.weight.quant_map": "model-00001-of-00002.safetensors",
696
+ "transformer.encoder.layers.6.mlp.dense_4h_to_h.weight.quant_state.bitsandbytes__fp4": "model-00001-of-00002.safetensors",
697
+ "transformer.encoder.layers.6.mlp.dense_h_to_4h.weight": "model-00001-of-00002.safetensors",
698
+ "transformer.encoder.layers.6.mlp.dense_h_to_4h.weight.absmax": "model-00001-of-00002.safetensors",
699
+ "transformer.encoder.layers.6.mlp.dense_h_to_4h.weight.quant_map": "model-00001-of-00002.safetensors",
700
+ "transformer.encoder.layers.6.mlp.dense_h_to_4h.weight.quant_state.bitsandbytes__fp4": "model-00001-of-00002.safetensors",
701
+ "transformer.encoder.layers.6.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
702
+ "transformer.encoder.layers.6.self_attention.dense.weight": "model-00001-of-00002.safetensors",
703
+ "transformer.encoder.layers.6.self_attention.dense.weight.absmax": "model-00001-of-00002.safetensors",
704
+ "transformer.encoder.layers.6.self_attention.dense.weight.quant_map": "model-00001-of-00002.safetensors",
705
+ "transformer.encoder.layers.6.self_attention.dense.weight.quant_state.bitsandbytes__fp4": "model-00001-of-00002.safetensors",
706
+ "transformer.encoder.layers.6.self_attention.query_key_value.bias": "model-00001-of-00002.safetensors",
707
+ "transformer.encoder.layers.6.self_attention.query_key_value.weight": "model-00001-of-00002.safetensors",
708
+ "transformer.encoder.layers.6.self_attention.query_key_value.weight.absmax": "model-00001-of-00002.safetensors",
709
+ "transformer.encoder.layers.6.self_attention.query_key_value.weight.quant_map": "model-00001-of-00002.safetensors",
710
+ "transformer.encoder.layers.6.self_attention.query_key_value.weight.quant_state.bitsandbytes__fp4": "model-00001-of-00002.safetensors",
711
+ "transformer.encoder.layers.7.input_layernorm.weight": "model-00001-of-00002.safetensors",
712
+ "transformer.encoder.layers.7.mlp.dense_4h_to_h.weight": "model-00001-of-00002.safetensors",
713
+ "transformer.encoder.layers.7.mlp.dense_4h_to_h.weight.absmax": "model-00001-of-00002.safetensors",
714
+ "transformer.encoder.layers.7.mlp.dense_4h_to_h.weight.quant_map": "model-00001-of-00002.safetensors",
715
+ "transformer.encoder.layers.7.mlp.dense_4h_to_h.weight.quant_state.bitsandbytes__fp4": "model-00001-of-00002.safetensors",
716
+ "transformer.encoder.layers.7.mlp.dense_h_to_4h.weight": "model-00001-of-00002.safetensors",
717
+ "transformer.encoder.layers.7.mlp.dense_h_to_4h.weight.absmax": "model-00001-of-00002.safetensors",
718
+ "transformer.encoder.layers.7.mlp.dense_h_to_4h.weight.quant_map": "model-00001-of-00002.safetensors",
719
+ "transformer.encoder.layers.7.mlp.dense_h_to_4h.weight.quant_state.bitsandbytes__fp4": "model-00001-of-00002.safetensors",
720
+ "transformer.encoder.layers.7.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
721
+ "transformer.encoder.layers.7.self_attention.dense.weight": "model-00001-of-00002.safetensors",
722
+ "transformer.encoder.layers.7.self_attention.dense.weight.absmax": "model-00001-of-00002.safetensors",
723
+ "transformer.encoder.layers.7.self_attention.dense.weight.quant_map": "model-00001-of-00002.safetensors",
724
+ "transformer.encoder.layers.7.self_attention.dense.weight.quant_state.bitsandbytes__fp4": "model-00001-of-00002.safetensors",
725
+ "transformer.encoder.layers.7.self_attention.query_key_value.bias": "model-00001-of-00002.safetensors",
726
+ "transformer.encoder.layers.7.self_attention.query_key_value.weight": "model-00001-of-00002.safetensors",
727
+ "transformer.encoder.layers.7.self_attention.query_key_value.weight.absmax": "model-00001-of-00002.safetensors",
728
+ "transformer.encoder.layers.7.self_attention.query_key_value.weight.quant_map": "model-00001-of-00002.safetensors",
729
+ "transformer.encoder.layers.7.self_attention.query_key_value.weight.quant_state.bitsandbytes__fp4": "model-00001-of-00002.safetensors",
730
+ "transformer.encoder.layers.8.input_layernorm.weight": "model-00001-of-00002.safetensors",
731
+ "transformer.encoder.layers.8.mlp.dense_4h_to_h.weight": "model-00001-of-00002.safetensors",
732
+ "transformer.encoder.layers.8.mlp.dense_4h_to_h.weight.absmax": "model-00001-of-00002.safetensors",
733
+ "transformer.encoder.layers.8.mlp.dense_4h_to_h.weight.quant_map": "model-00001-of-00002.safetensors",
734
+ "transformer.encoder.layers.8.mlp.dense_4h_to_h.weight.quant_state.bitsandbytes__fp4": "model-00001-of-00002.safetensors",
735
+ "transformer.encoder.layers.8.mlp.dense_h_to_4h.weight": "model-00001-of-00002.safetensors",
736
+ "transformer.encoder.layers.8.mlp.dense_h_to_4h.weight.absmax": "model-00001-of-00002.safetensors",
737
+ "transformer.encoder.layers.8.mlp.dense_h_to_4h.weight.quant_map": "model-00001-of-00002.safetensors",
738
+ "transformer.encoder.layers.8.mlp.dense_h_to_4h.weight.quant_state.bitsandbytes__fp4": "model-00001-of-00002.safetensors",
739
+ "transformer.encoder.layers.8.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
740
+ "transformer.encoder.layers.8.self_attention.dense.weight": "model-00001-of-00002.safetensors",
741
+ "transformer.encoder.layers.8.self_attention.dense.weight.absmax": "model-00001-of-00002.safetensors",
742
+ "transformer.encoder.layers.8.self_attention.dense.weight.quant_map": "model-00001-of-00002.safetensors",
743
+ "transformer.encoder.layers.8.self_attention.dense.weight.quant_state.bitsandbytes__fp4": "model-00001-of-00002.safetensors",
744
+ "transformer.encoder.layers.8.self_attention.query_key_value.bias": "model-00001-of-00002.safetensors",
745
+ "transformer.encoder.layers.8.self_attention.query_key_value.weight": "model-00001-of-00002.safetensors",
746
+ "transformer.encoder.layers.8.self_attention.query_key_value.weight.absmax": "model-00001-of-00002.safetensors",
747
+ "transformer.encoder.layers.8.self_attention.query_key_value.weight.quant_map": "model-00001-of-00002.safetensors",
748
+ "transformer.encoder.layers.8.self_attention.query_key_value.weight.quant_state.bitsandbytes__fp4": "model-00001-of-00002.safetensors",
749
+ "transformer.encoder.layers.9.input_layernorm.weight": "model-00001-of-00002.safetensors",
750
+ "transformer.encoder.layers.9.mlp.dense_4h_to_h.weight": "model-00001-of-00002.safetensors",
751
+ "transformer.encoder.layers.9.mlp.dense_4h_to_h.weight.absmax": "model-00001-of-00002.safetensors",
752
+ "transformer.encoder.layers.9.mlp.dense_4h_to_h.weight.quant_map": "model-00001-of-00002.safetensors",
753
+ "transformer.encoder.layers.9.mlp.dense_4h_to_h.weight.quant_state.bitsandbytes__fp4": "model-00001-of-00002.safetensors",
754
+ "transformer.encoder.layers.9.mlp.dense_h_to_4h.weight": "model-00001-of-00002.safetensors",
755
+ "transformer.encoder.layers.9.mlp.dense_h_to_4h.weight.absmax": "model-00001-of-00002.safetensors",
756
+ "transformer.encoder.layers.9.mlp.dense_h_to_4h.weight.quant_map": "model-00001-of-00002.safetensors",
757
+ "transformer.encoder.layers.9.mlp.dense_h_to_4h.weight.quant_state.bitsandbytes__fp4": "model-00001-of-00002.safetensors",
758
+ "transformer.encoder.layers.9.post_attention_layernorm.weight": "model-00001-of-00002.safetensors",
759
+ "transformer.encoder.layers.9.self_attention.dense.weight": "model-00001-of-00002.safetensors",
760
+ "transformer.encoder.layers.9.self_attention.dense.weight.absmax": "model-00001-of-00002.safetensors",
761
+ "transformer.encoder.layers.9.self_attention.dense.weight.quant_map": "model-00001-of-00002.safetensors",
762
+ "transformer.encoder.layers.9.self_attention.dense.weight.quant_state.bitsandbytes__fp4": "model-00001-of-00002.safetensors",
763
+ "transformer.encoder.layers.9.self_attention.query_key_value.bias": "model-00001-of-00002.safetensors",
764
+ "transformer.encoder.layers.9.self_attention.query_key_value.weight": "model-00001-of-00002.safetensors",
765
+ "transformer.encoder.layers.9.self_attention.query_key_value.weight.absmax": "model-00001-of-00002.safetensors",
766
+ "transformer.encoder.layers.9.self_attention.query_key_value.weight.quant_map": "model-00001-of-00002.safetensors",
767
+ "transformer.encoder.layers.9.self_attention.query_key_value.weight.quant_state.bitsandbytes__fp4": "model-00001-of-00002.safetensors",
768
+ "transformer.output_layer.weight": "model-00002-of-00002.safetensors",
769
+ "transformer.output_layer.weight.absmax": "model-00002-of-00002.safetensors",
770
+ "transformer.output_layer.weight.quant_map": "model-00002-of-00002.safetensors",
771
+ "transformer.output_layer.weight.quant_state.bitsandbytes__fp4": "model-00002-of-00002.safetensors",
772
+ "transformer.rotary_pos_emb.inv_freq": "model-00001-of-00002.safetensors"
773
+ }
774
+ }
modeling_chatglm.py ADDED
@@ -0,0 +1,898 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """ PyTorch ChatGLM model. """
2
+
3
+ import math
4
+ import copy
5
+ import warnings
6
+ import re
7
+ import sys
8
+
9
+ import torch
10
+ import torch.utils.checkpoint
11
+ import torch.nn.functional as F
12
+ from torch import nn
13
+ from torch.nn import CrossEntropyLoss, LayerNorm
14
+ from torch.nn.utils import skip_init
15
+ from typing import Optional, Tuple, Union, List, Callable, Dict, Any
16
+
17
+ from transformers.modeling_outputs import (
18
+ BaseModelOutputWithPast,
19
+ CausalLMOutputWithPast,
20
+ )
21
+ from transformers.modeling_utils import PreTrainedModel
22
+ from transformers.utils import logging
23
+ from transformers.generation.logits_process import LogitsProcessor
24
+ from transformers.generation.utils import LogitsProcessorList, StoppingCriteriaList, GenerationConfig, ModelOutput
25
+
26
+ from .configuration_chatglm import ChatGLMConfig
27
+ from einops import rearrange
28
+ try:
29
+ from flash_attn.flash_attn_interface import flash_attn_unpadded_func
30
+ except ImportError:
31
+ try:
32
+ # FlashAttention-2
33
+ from flash_attn.flash_attn_interface import flash_attn_varlen_func as flash_attn_unpadded_func
34
+ except ImportError:
35
+ flash_attn_unpadded_func = None
36
+
37
+ # flags required to enable jit fusion kernels
38
+
39
+ if sys.platform != 'darwin':
40
+ torch._C._jit_set_profiling_mode(False)
41
+ torch._C._jit_set_profiling_executor(False)
42
+ torch._C._jit_override_can_fuse_on_cpu(True)
43
+ torch._C._jit_override_can_fuse_on_gpu(True)
44
+
45
+ logger = logging.get_logger(__name__)
46
+
47
+ _CHECKPOINT_FOR_DOC = "THUDM/ChatGLM2-6B"
48
+ _CONFIG_FOR_DOC = "ChatGLM6BConfig"
49
+
50
+ CHATGLM_6B_PRETRAINED_MODEL_ARCHIVE_LIST = [
51
+ "THUDM/chatglm2-6b",
52
+ # See all ChatGLM models at https://huggingface.co/models?filter=chatglm
53
+ ]
54
+
55
+ def default_init(cls, *args, **kwargs):
56
+ return cls(*args, **kwargs)
57
+
58
+
59
+ class InvalidScoreLogitsProcessor(LogitsProcessor):
60
+ def __call__(self, input_ids: torch.LongTensor, scores: torch.FloatTensor) -> torch.FloatTensor:
61
+ if torch.isnan(scores).any() or torch.isinf(scores).any():
62
+ scores.zero_()
63
+ scores[..., 5] = 5e4
64
+ return scores
65
+
66
+ def split_tensor_along_last_dim(
67
+ tensor: torch.Tensor,
68
+ num_partitions: int,
69
+ contiguous_split_chunks: bool = False,
70
+ ) -> List[torch.Tensor]:
71
+ """Split a tensor along its last dimension.
72
+
73
+ Arguments:
74
+ tensor: input tensor.
75
+ num_partitions: number of partitions to split the tensor
76
+ contiguous_split_chunks: If True, make each chunk contiguous
77
+ in memory.
78
+
79
+ Returns:
80
+ A list of Tensors
81
+ """
82
+ # Get the size and dimension.
83
+ last_dim = tensor.dim() - 1
84
+ last_dim_size = tensor.size()[last_dim] // num_partitions
85
+ # Split.
86
+ tensor_list = torch.split(tensor, last_dim_size, dim=last_dim)
87
+ # Note: torch.split does not create contiguous tensors by default.
88
+ if contiguous_split_chunks:
89
+ return tuple(chunk.contiguous() for chunk in tensor_list)
90
+
91
+ return tensor_list
92
+
93
+
94
+ class RotaryEmbedding(nn.Module):
95
+ def __init__(self, dim, rope_ratio=1, original_impl=False, device=None, dtype=None):
96
+ super().__init__()
97
+ inv_freq = 1.0 / (10000 ** (torch.arange(0, dim, 2, device=device).to(dtype=dtype) / dim))
98
+ self.register_buffer("inv_freq", inv_freq)
99
+ self.dim = dim
100
+ self.original_impl = original_impl
101
+ self.rope_ratio = rope_ratio
102
+
103
+ def forward_impl(
104
+ self, seq_len: int, n_elem: int, dtype: torch.dtype, device: torch.device, base: int = 10000
105
+ ):
106
+ """Enhanced Transformer with Rotary Position Embedding.
107
+
108
+ Derived from: https://github.com/labmlai/annotated_deep_learning_paper_implementations/blob/master/labml_nn/
109
+ transformers/rope/__init__.py. MIT License:
110
+ https://github.com/labmlai/annotated_deep_learning_paper_implementations/blob/master/license.
111
+ """
112
+ # $\Theta = {\theta_i = 10000^{\frac{2(i-1)}{d}}, i \in [1, 2, ..., \frac{d}{2}]}$
113
+
114
+ base = base * self.rope_ratio
115
+ theta = 1.0 / (base ** (torch.arange(0, n_elem, 2, dtype=torch.float, device=device) / n_elem))
116
+
117
+ # Create position indexes `[0, 1, ..., seq_len - 1]`
118
+ seq_idx = torch.arange(seq_len, dtype=torch.float, device=device)
119
+
120
+ # Calculate the product of position index and $\theta_i$
121
+ idx_theta = torch.outer(seq_idx, theta).float()
122
+
123
+ cache = torch.stack([torch.cos(idx_theta), torch.sin(idx_theta)], dim=-1)
124
+
125
+ # this is to mimic the behaviour of complex32, else we will get different results
126
+ if dtype in (torch.float16, torch.bfloat16, torch.int8):
127
+ cache = cache.bfloat16() if dtype == torch.bfloat16 else cache.half()
128
+ return cache
129
+
130
+ def forward(self, max_seq_len, offset=0):
131
+ return self.forward_impl(
132
+ max_seq_len, self.dim, dtype=self.inv_freq.dtype, device=self.inv_freq.device
133
+ )
134
+
135
+
136
+ @torch.jit.script
137
+ def apply_rotary_pos_emb(x: torch.Tensor, rope_cache: torch.Tensor) -> torch.Tensor:
138
+ # x: [sq, b, np, hn]
139
+ sq, b, np, hn = x.size(0), x.size(1), x.size(2), x.size(3)
140
+ rot_dim = rope_cache.shape[-2] * 2
141
+ x, x_pass = x[..., :rot_dim], x[..., rot_dim:]
142
+ # truncate to support variable sizes
143
+ rope_cache = rope_cache[:sq]
144
+ xshaped = x.reshape(sq, -1, np, rot_dim // 2, 2)
145
+ rope_cache = rope_cache.view(sq, -1, 1, xshaped.size(3), 2)
146
+ x_out2 = torch.stack(
147
+ [
148
+ xshaped[..., 0] * rope_cache[..., 0] - xshaped[..., 1] * rope_cache[..., 1],
149
+ xshaped[..., 1] * rope_cache[..., 0] + xshaped[..., 0] * rope_cache[..., 1],
150
+ ],
151
+ -1,
152
+ )
153
+ x_out2 = x_out2.flatten(3)
154
+ return torch.cat((x_out2, x_pass), dim=-1)
155
+
156
+
157
+ class RMSNorm(torch.nn.Module):
158
+ def __init__(self, normalized_shape, eps=1e-5, device=None, dtype=None, **kwargs):
159
+ super().__init__()
160
+ self.weight = torch.nn.Parameter(torch.empty(normalized_shape, device=device, dtype=dtype))
161
+ self.eps = eps
162
+
163
+ def forward(self, hidden_states: torch.Tensor):
164
+ input_dtype = hidden_states.dtype
165
+ variance = hidden_states.to(torch.float32).pow(2).mean(-1, keepdim=True)
166
+ hidden_states = hidden_states * torch.rsqrt(variance + self.eps)
167
+
168
+ return (self.weight * hidden_states).to(input_dtype)
169
+
170
+
171
+ class CoreAttention(torch.nn.Module):
172
+ def __init__(self, config: ChatGLMConfig, layer_number):
173
+ super(CoreAttention, self).__init__()
174
+
175
+ self.apply_query_key_layer_scaling = config.apply_query_key_layer_scaling
176
+ self.attention_softmax_in_fp32 = config.attention_softmax_in_fp32
177
+ if self.apply_query_key_layer_scaling:
178
+ self.attention_softmax_in_fp32 = True
179
+ self.layer_number = max(1, layer_number)
180
+
181
+ projection_size = config.kv_channels * config.num_attention_heads
182
+
183
+ # Per attention head and per partition values.
184
+ self.hidden_size_per_partition = projection_size
185
+ self.hidden_size_per_attention_head = projection_size // config.num_attention_heads
186
+ self.num_attention_heads_per_partition = config.num_attention_heads
187
+
188
+ self.norm_factor = math.sqrt(self.hidden_size_per_attention_head)
189
+ self.attention_dropout = config.attention_dropout
190
+
191
+ def forward(self, query_layer, key_layer, value_layer, attention_mask):
192
+ seqlen_q, batch_size = query_layer.shape[0], query_layer.shape[1]
193
+ seqlen_k = key_layer.shape[0]
194
+ query_layer, key_layer, value_layer = [rearrange(x, 's b ... -> (b s) ...') for x in [query_layer, key_layer, value_layer]]
195
+ # DO flash_attn_varlen_func
196
+ if attention_mask is None or attention_mask.ndim != 1:
197
+ cu_seqlens_q = torch.arange(0, (batch_size + 1) * seqlen_q, step=seqlen_q, dtype=torch.int32,
198
+ device=query_layer.device)
199
+ else:
200
+ assert seqlen_q == seqlen_k
201
+ cu_seqlens_q = attention_mask
202
+ if self.training:
203
+ assert seqlen_k == seqlen_q
204
+ is_causal = True
205
+ cu_seqlens_k = cu_seqlens_q
206
+ else:
207
+ is_causal = seqlen_q == seqlen_k
208
+ cu_seqlens_k = torch.arange(0, (batch_size + 1) * seqlen_k, step=seqlen_k, dtype=torch.int32,
209
+ device=query_layer.device) if not is_causal else cu_seqlens_q
210
+ self.attention_dropout = 0
211
+ context_layer = flash_attn_unpadded_func(
212
+ query_layer, key_layer, value_layer, cu_seqlens_q, cu_seqlens_k, seqlen_q, seqlen_k,
213
+ self.attention_dropout,
214
+ softmax_scale=1.0 / self.norm_factor, causal=is_causal
215
+ )
216
+ context_layer = rearrange(context_layer, '(b s) ... -> s b ...', b=batch_size)
217
+ new_context_layer_shape = context_layer.size()[:-2] + (self.hidden_size_per_partition,)
218
+ context_layer = context_layer.reshape(*new_context_layer_shape)
219
+ return context_layer
220
+
221
+
222
+ class SelfAttention(torch.nn.Module):
223
+ """Parallel self-attention layer abstract class.
224
+
225
+ Self-attention layer takes input with size [s, b, h]
226
+ and returns output of the same size.
227
+ """
228
+
229
+ def __init__(self, config: ChatGLMConfig, layer_number, device=None):
230
+ super(SelfAttention, self).__init__()
231
+ self.layer_number = max(1, layer_number)
232
+
233
+ self.projection_size = config.kv_channels * config.num_attention_heads
234
+
235
+ # Per attention head and per partition values.
236
+ self.hidden_size_per_attention_head = self.projection_size // config.num_attention_heads
237
+ self.num_attention_heads_per_partition = config.num_attention_heads
238
+
239
+ self.multi_query_attention = config.multi_query_attention
240
+ self.qkv_hidden_size = 3 * self.projection_size
241
+ if self.multi_query_attention:
242
+ self.num_multi_query_groups_per_partition = config.multi_query_group_num
243
+ self.qkv_hidden_size = (
244
+ self.projection_size + 2 * self.hidden_size_per_attention_head * config.multi_query_group_num
245
+ )
246
+ self.query_key_value = nn.Linear(config.hidden_size, self.qkv_hidden_size,
247
+ bias=config.add_bias_linear or config.add_qkv_bias,
248
+ device=device, **_config_to_kwargs(config)
249
+ )
250
+
251
+ self.core_attention = CoreAttention(config, self.layer_number)
252
+
253
+ # Output.
254
+ self.dense = nn.Linear(self.projection_size, config.hidden_size, bias=config.add_bias_linear,
255
+ device=device, **_config_to_kwargs(config)
256
+ )
257
+
258
+ def _allocate_memory(self, inference_max_sequence_len, batch_size, device=None, dtype=None):
259
+ if self.multi_query_attention:
260
+ num_attention_heads = self.num_multi_query_groups_per_partition
261
+ else:
262
+ num_attention_heads = self.num_attention_heads_per_partition
263
+ return torch.empty(
264
+ inference_max_sequence_len,
265
+ batch_size,
266
+ num_attention_heads,
267
+ self.hidden_size_per_attention_head,
268
+ dtype=dtype,
269
+ device=device,
270
+ )
271
+
272
+ def forward(
273
+ self, hidden_states, attention_mask, rotary_pos_emb, kv_cache=None, use_cache=True
274
+ ):
275
+ # hidden_states: [sq, b, h]
276
+
277
+ # =================================================
278
+ # Pre-allocate memory for key-values for inference.
279
+ # =================================================
280
+ # =====================
281
+ # Query, Key, and Value
282
+ # =====================
283
+
284
+ # Attention heads [sq, b, h] --> [sq, b, (np * 3 * hn)]
285
+ mixed_x_layer = self.query_key_value(hidden_states)
286
+
287
+ if self.multi_query_attention:
288
+ (query_layer, key_layer, value_layer) = mixed_x_layer.split(
289
+ [
290
+ self.num_attention_heads_per_partition * self.hidden_size_per_attention_head,
291
+ self.num_multi_query_groups_per_partition * self.hidden_size_per_attention_head,
292
+ self.num_multi_query_groups_per_partition * self.hidden_size_per_attention_head,
293
+ ],
294
+ dim=-1,
295
+ )
296
+ query_layer = query_layer.view(
297
+ query_layer.size()[:-1] + (self.num_attention_heads_per_partition, self.hidden_size_per_attention_head)
298
+ )
299
+ key_layer = key_layer.view(
300
+ key_layer.size()[:-1] + (self.num_multi_query_groups_per_partition, self.hidden_size_per_attention_head)
301
+ )
302
+ value_layer = value_layer.view(
303
+ value_layer.size()[:-1]
304
+ + (self.num_multi_query_groups_per_partition, self.hidden_size_per_attention_head)
305
+ )
306
+ else:
307
+ new_tensor_shape = mixed_x_layer.size()[:-1] + \
308
+ (self.num_attention_heads_per_partition,
309
+ 3 * self.hidden_size_per_attention_head)
310
+ mixed_x_layer = mixed_x_layer.view(*new_tensor_shape)
311
+
312
+ # [sq, b, np, 3 * hn] --> 3 [sq, b, np, hn]
313
+ (query_layer, key_layer, value_layer) = split_tensor_along_last_dim(mixed_x_layer, 3)
314
+
315
+ # apply relative positional encoding (rotary embedding)
316
+ if rotary_pos_emb is not None:
317
+ query_layer = apply_rotary_pos_emb(query_layer, rotary_pos_emb)
318
+ key_layer = apply_rotary_pos_emb(key_layer, rotary_pos_emb)
319
+
320
+ # adjust key and value for inference
321
+ if use_cache:
322
+ if kv_cache is not None:
323
+ cache_k, cache_v = kv_cache
324
+ key_layer = torch.cat((cache_k, key_layer), dim=0)
325
+ value_layer = torch.cat((cache_v, value_layer), dim=0)
326
+ kv_cache = (key_layer, value_layer)
327
+ else:
328
+ kv_cache = None
329
+
330
+
331
+ if self.multi_query_attention:
332
+ key_layer = key_layer.unsqueeze(-2)
333
+ key_layer = key_layer.expand(
334
+ -1, -1, -1, self.num_attention_heads_per_partition // self.num_multi_query_groups_per_partition, -1
335
+ )
336
+ key_layer = key_layer.contiguous().view(
337
+ key_layer.size()[:2] + (self.num_attention_heads_per_partition, self.hidden_size_per_attention_head)
338
+ )
339
+ value_layer = value_layer.unsqueeze(-2)
340
+ value_layer = value_layer.expand(
341
+ -1, -1, -1, self.num_attention_heads_per_partition // self.num_multi_query_groups_per_partition, -1
342
+ )
343
+ value_layer = value_layer.contiguous().view(
344
+ value_layer.size()[:2] + (self.num_attention_heads_per_partition, self.hidden_size_per_attention_head)
345
+ )
346
+
347
+ # ==================================
348
+ # core attention computation
349
+ # ==================================
350
+
351
+ context_layer = self.core_attention(query_layer, key_layer, value_layer, attention_mask)
352
+
353
+ # =================
354
+ # Output. [sq, b, h]
355
+ # =================
356
+
357
+ output = self.dense(context_layer)
358
+
359
+ return output, kv_cache
360
+
361
+
362
+ def _config_to_kwargs(args):
363
+ common_kwargs = {
364
+ "dtype": args.torch_dtype,
365
+ }
366
+ return common_kwargs
367
+
368
+
369
+ class MLP(torch.nn.Module):
370
+ """MLP.
371
+
372
+ MLP will take the input with h hidden state, project it to 4*h
373
+ hidden dimension, perform nonlinear transformation, and project the
374
+ state back into h hidden dimension.
375
+ """
376
+
377
+ def __init__(self, config: ChatGLMConfig, device=None):
378
+ super(MLP, self).__init__()
379
+
380
+ self.add_bias = config.add_bias_linear
381
+
382
+ # Project to 4h. If using swiglu double the output width, see https://arxiv.org/pdf/2002.05202.pdf
383
+ self.dense_h_to_4h = nn.Linear(
384
+ config.hidden_size,
385
+ config.ffn_hidden_size * 2,
386
+ bias=self.add_bias,
387
+ device=device,
388
+ **_config_to_kwargs(config)
389
+ )
390
+
391
+ def swiglu(x):
392
+ x = torch.chunk(x, 2, dim=-1)
393
+ return F.silu(x[0]) * x[1]
394
+
395
+ self.activation_func = swiglu
396
+
397
+ # Project back to h.
398
+ self.dense_4h_to_h = nn.Linear(
399
+ config.ffn_hidden_size,
400
+ config.hidden_size,
401
+ bias=self.add_bias,
402
+ device=device,
403
+ **_config_to_kwargs(config)
404
+ )
405
+
406
+ def forward(self, hidden_states):
407
+ # [s, b, 4hp]
408
+ intermediate_parallel = self.dense_h_to_4h(hidden_states)
409
+ intermediate_parallel = self.activation_func(intermediate_parallel)
410
+ # [s, b, h]
411
+ output = self.dense_4h_to_h(intermediate_parallel)
412
+ return output
413
+
414
+
415
+ class GLMBlock(torch.nn.Module):
416
+ """A single transformer layer.
417
+
418
+ Transformer layer takes input with size [s, b, h] and returns an
419
+ output of the same size.
420
+ """
421
+
422
+ def __init__(self, config: ChatGLMConfig, layer_number, device=None):
423
+ super(GLMBlock, self).__init__()
424
+ self.layer_number = layer_number
425
+
426
+ self.apply_residual_connection_post_layernorm = config.apply_residual_connection_post_layernorm
427
+
428
+ self.fp32_residual_connection = config.fp32_residual_connection
429
+
430
+ LayerNormFunc = RMSNorm if config.rmsnorm else LayerNorm
431
+ # Layernorm on the input data.
432
+ self.input_layernorm = LayerNormFunc(config.hidden_size, eps=config.layernorm_epsilon, device=device,
433
+ dtype=config.torch_dtype)
434
+
435
+ # Self attention.
436
+ self.self_attention = SelfAttention(config, layer_number, device=device)
437
+ self.hidden_dropout = config.hidden_dropout
438
+
439
+ # Layernorm on the attention output
440
+ self.post_attention_layernorm = LayerNormFunc(config.hidden_size, eps=config.layernorm_epsilon, device=device,
441
+ dtype=config.torch_dtype)
442
+
443
+ # MLP
444
+ self.mlp = MLP(config, device=device)
445
+
446
+ def forward(
447
+ self, hidden_states, attention_mask, rotary_pos_emb, kv_cache=None, use_cache=True,
448
+ ):
449
+ # hidden_states: [s, b, h]
450
+
451
+ # Layer norm at the beginning of the transformer layer.
452
+ layernorm_output = self.input_layernorm(hidden_states)
453
+ # Self attention.
454
+ attention_output, kv_cache = self.self_attention(
455
+ layernorm_output,
456
+ attention_mask,
457
+ rotary_pos_emb,
458
+ kv_cache=kv_cache,
459
+ use_cache=use_cache
460
+ )
461
+
462
+ # Residual connection.
463
+ if self.apply_residual_connection_post_layernorm:
464
+ residual = layernorm_output
465
+ else:
466
+ residual = hidden_states
467
+
468
+ layernorm_input = torch.nn.functional.dropout(attention_output, p=self.hidden_dropout, training=self.training)
469
+ layernorm_input = residual + layernorm_input
470
+
471
+ # Layer norm post the self attention.
472
+ layernorm_output = self.post_attention_layernorm(layernorm_input)
473
+
474
+ # MLP.
475
+ mlp_output = self.mlp(layernorm_output)
476
+
477
+ # Second residual connection.
478
+ if self.apply_residual_connection_post_layernorm:
479
+ residual = layernorm_output
480
+ else:
481
+ residual = layernorm_input
482
+
483
+ output = torch.nn.functional.dropout(mlp_output, p=self.hidden_dropout, training=self.training)
484
+ output = residual + output
485
+
486
+ return output, kv_cache
487
+
488
+
489
+ class GLMTransformer(torch.nn.Module):
490
+ """Transformer class."""
491
+
492
+ def __init__(self, config: ChatGLMConfig, device=None):
493
+ super(GLMTransformer, self).__init__()
494
+
495
+ self.fp32_residual_connection = config.fp32_residual_connection
496
+ self.post_layer_norm = config.post_layer_norm
497
+
498
+ # Number of layers.
499
+ self.num_layers = config.num_layers
500
+
501
+ # Transformer layers.
502
+ def build_layer(layer_number):
503
+ return GLMBlock(config, layer_number, device=device)
504
+
505
+ self.layers = torch.nn.ModuleList([build_layer(i + 1) for i in range(self.num_layers)])
506
+
507
+ if self.post_layer_norm:
508
+ LayerNormFunc = RMSNorm if config.rmsnorm else LayerNorm
509
+ # Final layer norm before output.
510
+ self.final_layernorm = LayerNormFunc(config.hidden_size, eps=config.layernorm_epsilon, device=device,
511
+ dtype=config.torch_dtype)
512
+
513
+ self.gradient_checkpointing = False
514
+
515
+ def _get_layer(self, layer_number):
516
+ return self.layers[layer_number]
517
+
518
+ def forward(
519
+ self, hidden_states, attention_mask, rotary_pos_emb, kv_caches=None,
520
+ use_cache: Optional[bool] = True,
521
+ output_hidden_states: Optional[bool] = False,
522
+ ):
523
+ if not kv_caches:
524
+ kv_caches = [None for _ in range(self.num_layers)]
525
+ presents = () if use_cache else None
526
+ if self.gradient_checkpointing and self.training:
527
+ if use_cache:
528
+ # logger.warning_once(
529
+ # "`use_cache=True` is incompatible with gradient checkpointing. Setting `use_cache=False`..."
530
+ # )
531
+ use_cache = False
532
+
533
+ all_self_attentions = None
534
+ all_hidden_states = () if output_hidden_states else None
535
+ for index in range(self.num_layers):
536
+ if output_hidden_states:
537
+ all_hidden_states = all_hidden_states + (hidden_states,)
538
+
539
+ layer = self._get_layer(index)
540
+ if self.gradient_checkpointing and self.training:
541
+ layer_ret = torch.utils.checkpoint.checkpoint(
542
+ layer,
543
+ hidden_states,
544
+ attention_mask,
545
+ rotary_pos_emb,
546
+ kv_caches[index],
547
+ use_cache,
548
+ use_reentrant=False
549
+ )
550
+ else:
551
+ layer_ret = layer(
552
+ hidden_states,
553
+ attention_mask,
554
+ rotary_pos_emb,
555
+ kv_cache=kv_caches[index],
556
+ use_cache=use_cache
557
+ )
558
+ hidden_states, kv_cache = layer_ret
559
+ if use_cache:
560
+ presents = presents + (kv_cache,)
561
+
562
+ if output_hidden_states:
563
+ all_hidden_states = all_hidden_states + (hidden_states,)
564
+
565
+ # Final layer norm.
566
+ if self.post_layer_norm:
567
+ hidden_states = self.final_layernorm(hidden_states)
568
+
569
+ return hidden_states, presents, all_hidden_states, all_self_attentions
570
+
571
+
572
+ class ChatGLMPreTrainedModel(PreTrainedModel):
573
+ """
574
+ An abstract class to handle weights initialization and
575
+ a simple interface for downloading and loading pretrained models.
576
+ """
577
+
578
+ is_parallelizable = False
579
+ supports_gradient_checkpointing = True
580
+ config_class = ChatGLMConfig
581
+ base_model_prefix = "transformer"
582
+ _no_split_modules = ["GLMBlock"]
583
+
584
+ def _init_weights(self, module: nn.Module):
585
+ """Initialize the weights."""
586
+ return
587
+
588
+ def get_masks(self, input_ids, past_key_values, padding_mask=None):
589
+ batch_size, seq_length = input_ids.shape
590
+ full_attention_mask = torch.ones(batch_size, seq_length, seq_length, device=input_ids.device)
591
+ full_attention_mask.tril_()
592
+ past_length = 0
593
+ if past_key_values:
594
+ past_length = past_key_values[0][0].shape[0]
595
+ if past_length:
596
+ full_attention_mask = torch.cat((torch.ones(batch_size, seq_length, past_length,
597
+ device=input_ids.device), full_attention_mask), dim=-1)
598
+ if padding_mask is not None:
599
+ full_attention_mask = full_attention_mask * padding_mask.unsqueeze(1)
600
+ if not past_length and padding_mask is not None:
601
+ full_attention_mask -= padding_mask.unsqueeze(-1) - 1
602
+ full_attention_mask = (full_attention_mask < 0.5).bool()
603
+ full_attention_mask.unsqueeze_(1)
604
+ return full_attention_mask
605
+
606
+ def get_position_ids(self, input_ids, device):
607
+ batch_size, seq_length = input_ids.shape
608
+ position_ids = torch.arange(seq_length, dtype=torch.long, device=device).unsqueeze(0).repeat(batch_size, 1)
609
+ return position_ids
610
+
611
+ def _set_gradient_checkpointing(self, module, value=False):
612
+ if isinstance(module, GLMTransformer):
613
+ module.gradient_checkpointing = value
614
+
615
+
616
+ class Embedding(torch.nn.Module):
617
+ """Language model embeddings."""
618
+
619
+ def __init__(self, config: ChatGLMConfig, device=None):
620
+ super(Embedding, self).__init__()
621
+
622
+ self.hidden_size = config.hidden_size
623
+ # Word embeddings (parallel).
624
+ self.word_embeddings = nn.Embedding(
625
+ config.padded_vocab_size,
626
+ self.hidden_size,
627
+ dtype=config.torch_dtype,
628
+ device=device
629
+ )
630
+ self.fp32_residual_connection = config.fp32_residual_connection
631
+
632
+ def forward(self, input_ids):
633
+ # Embeddings.
634
+ words_embeddings = self.word_embeddings(input_ids)
635
+ embeddings = words_embeddings
636
+ # Data format change to avoid explicit tranposes : [b s h] --> [s b h].
637
+ embeddings = embeddings.transpose(0, 1).contiguous()
638
+ # If the input flag for fp32 residual connection is set, convert for float.
639
+ if self.fp32_residual_connection:
640
+ embeddings = embeddings.float()
641
+ return embeddings
642
+
643
+
644
+ class ChatGLMModel(ChatGLMPreTrainedModel):
645
+ def __init__(self, config: ChatGLMConfig, device=None, empty_init=True):
646
+ super().__init__(config)
647
+ if empty_init:
648
+ init_method = skip_init
649
+ else:
650
+ init_method = default_init
651
+ init_kwargs = {}
652
+ if device is not None:
653
+ init_kwargs["device"] = device
654
+ self.embedding = init_method(Embedding, config, **init_kwargs)
655
+
656
+ # Rotary positional embeddings
657
+ self.seq_length = config.seq_length
658
+ rotary_dim = (
659
+ config.hidden_size // config.num_attention_heads if config.kv_channels is None else config.kv_channels
660
+ )
661
+
662
+ self.rotary_pos_emb = RotaryEmbedding(rotary_dim // 2, rope_ratio=config.rope_ratio, original_impl=config.original_rope,
663
+ device=device, dtype=config.torch_dtype)
664
+ self.encoder = init_method(GLMTransformer, config, **init_kwargs)
665
+ self.output_layer = init_method(nn.Linear, config.hidden_size, config.padded_vocab_size, bias=False,
666
+ dtype=config.torch_dtype, **init_kwargs)
667
+
668
+ def get_input_embeddings(self):
669
+ return self.embedding.word_embeddings
670
+
671
+ def forward(
672
+ self,
673
+ input_ids,
674
+ position_ids: Optional[torch.Tensor] = None,
675
+ attention_mask: Optional[torch.BoolTensor] = None,
676
+ full_attention_mask: Optional[torch.BoolTensor] = None,
677
+ past_key_values: Optional[Tuple[Tuple[torch.Tensor, torch.Tensor], ...]] = None,
678
+ inputs_embeds: Optional[torch.Tensor] = None,
679
+ use_cache: Optional[bool] = None,
680
+ output_hidden_states: Optional[bool] = None,
681
+ return_dict: Optional[bool] = None,
682
+ ):
683
+ output_hidden_states = (
684
+ output_hidden_states if output_hidden_states is not None else self.config.output_hidden_states
685
+ )
686
+ use_cache = use_cache if use_cache is not None else self.config.use_cache
687
+ return_dict = return_dict if return_dict is not None else self.config.use_return_dict
688
+
689
+ batch_size, seq_length = input_ids.shape
690
+
691
+ if inputs_embeds is None:
692
+ inputs_embeds = self.embedding(input_ids)
693
+
694
+ # if full_attention_mask is None:
695
+ # if (attention_mask is not None and not attention_mask.all()) or (past_key_values and seq_length != 1):
696
+ # full_attention_mask = self.get_masks(input_ids, past_key_values, padding_mask=attention_mask)
697
+
698
+ # Rotary positional embeddings
699
+ rotary_pos_emb = self.rotary_pos_emb(self.seq_length)
700
+ if position_ids is not None:
701
+ rotary_pos_emb = rotary_pos_emb[position_ids]
702
+ else:
703
+ rotary_pos_emb = rotary_pos_emb[None, :seq_length]
704
+ rotary_pos_emb = rotary_pos_emb.transpose(0, 1).contiguous()
705
+
706
+ # Run encoder.
707
+ hidden_states, presents, all_hidden_states, all_self_attentions = self.encoder(
708
+ inputs_embeds, attention_mask, rotary_pos_emb=rotary_pos_emb,
709
+ kv_caches=past_key_values, use_cache=use_cache, output_hidden_states=output_hidden_states
710
+ )
711
+
712
+ if not return_dict:
713
+ return tuple(v for v in [hidden_states, presents, all_hidden_states, all_self_attentions] if v is not None)
714
+
715
+ return BaseModelOutputWithPast(
716
+ last_hidden_state=hidden_states,
717
+ past_key_values=presents,
718
+ hidden_states=all_hidden_states,
719
+ attentions=all_self_attentions,
720
+ )
721
+
722
+
723
+ class ChatGLMForConditionalGeneration(ChatGLMPreTrainedModel):
724
+ def __init__(self, config: ChatGLMConfig, empty_init=True, device=None):
725
+ super().__init__(config)
726
+
727
+ self.max_sequence_length = config.max_length
728
+ self.transformer = ChatGLMModel(config, empty_init=empty_init, device=device)
729
+ self.config = config
730
+ self.pack_loss = False
731
+
732
+ def _update_model_kwargs_for_generation(
733
+ self,
734
+ outputs: ModelOutput,
735
+ model_kwargs: Dict[str, Any],
736
+ is_encoder_decoder: bool = False,
737
+ ) -> Dict[str, Any]:
738
+ # update past_key_values
739
+ cache_name, cache = self._extract_past_from_model_output(outputs)
740
+ model_kwargs[cache_name] = cache
741
+
742
+ # update attention mask
743
+ if "attention_mask" in model_kwargs:
744
+ attention_mask = model_kwargs["attention_mask"]
745
+ model_kwargs["attention_mask"] = torch.cat(
746
+ [attention_mask, attention_mask.new_ones((attention_mask.shape[0], 1))], dim=-1
747
+ )
748
+
749
+ # update position ids
750
+ if "position_ids" in model_kwargs:
751
+ position_ids = model_kwargs["position_ids"]
752
+ new_position_id = position_ids[..., -1:].clone()
753
+ new_position_id += 1
754
+ model_kwargs["position_ids"] = torch.cat(
755
+ [position_ids, new_position_id], dim=-1
756
+ )
757
+
758
+ model_kwargs["is_first_forward"] = False
759
+ return model_kwargs
760
+
761
+ def prepare_inputs_for_generation(
762
+ self,
763
+ input_ids: torch.LongTensor,
764
+ past_key_values: Optional[torch.Tensor] = None,
765
+ attention_mask: Optional[torch.Tensor] = None,
766
+ position_ids: Optional[torch.Tensor] = None,
767
+ is_first_forward: bool = True,
768
+ **kwargs
769
+ ) -> dict:
770
+ # only last token for input_ids if past is not None
771
+ if position_ids is None:
772
+ position_ids = self.get_position_ids(input_ids, device=input_ids.device)
773
+ if not is_first_forward:
774
+ position_ids = position_ids[..., -1:]
775
+ input_ids = input_ids[:, -1:]
776
+ return {
777
+ "input_ids": input_ids,
778
+ "past_key_values": past_key_values,
779
+ "position_ids": position_ids,
780
+ "attention_mask": attention_mask,
781
+ "return_last_logit": True
782
+ }
783
+
784
+ def forward(
785
+ self,
786
+ input_ids: Optional[torch.Tensor] = None,
787
+ position_ids: Optional[torch.Tensor] = None,
788
+ attention_mask: Optional[torch.Tensor] = None,
789
+ past_key_values: Optional[Tuple[torch.FloatTensor]] = None,
790
+ inputs_embeds: Optional[torch.Tensor] = None,
791
+ labels: Optional[Tuple[torch.Tensor]] = None,
792
+ use_cache: Optional[bool] = None,
793
+ output_attentions: Optional[bool] = None,
794
+ output_hidden_states: Optional[bool] = None,
795
+ return_dict: Optional[bool] = None,
796
+ return_last_logit: Optional[bool] = False,
797
+ ):
798
+ use_cache = use_cache if use_cache is not None else self.config.use_cache
799
+ return_dict = return_dict if return_dict is not None else self.config.use_return_dict
800
+
801
+ transformer_outputs = self.transformer(
802
+ input_ids=input_ids,
803
+ position_ids=position_ids,
804
+ attention_mask=attention_mask,
805
+ past_key_values=past_key_values,
806
+ inputs_embeds=inputs_embeds,
807
+ use_cache=use_cache,
808
+ output_hidden_states=output_hidden_states,
809
+ return_dict=return_dict,
810
+ )
811
+
812
+ hidden_states = transformer_outputs[0]
813
+ if return_last_logit:
814
+ hidden_states = hidden_states[-1:]
815
+ lm_logits = self.transformer.output_layer(hidden_states)
816
+ lm_logits = lm_logits.transpose(0, 1).contiguous()
817
+
818
+ loss = None
819
+ if labels is not None:
820
+ lm_logits = lm_logits.to(torch.float32)
821
+ # Shift so that tokens < n predict n
822
+ shift_logits = lm_logits[..., :-1, :].contiguous()
823
+ if isinstance(labels, tuple) or isinstance(labels, list):
824
+ labels, weights = labels
825
+ shift_labels = labels[..., 1:].contiguous()
826
+ if self.pack_loss:
827
+ loss_fct = CrossEntropyLoss(ignore_index=-100)#, reduction='none')
828
+ loss = loss_fct(shift_logits.view(-1, shift_logits.size(-1)), shift_labels.view(-1))
829
+ loss *= weights
830
+ # if self.pack_loss:
831
+ # shift_weights = weights[..., 1:].contiguous()
832
+ # loss_fct = CrossEntropyLoss(ignore_index=-100, reduction='none')
833
+ # loss = loss_fct(shift_logits.view(-1, shift_logits.size(-1)), shift_labels.view(-1))
834
+ # loss = (loss * shift_weights).sum()
835
+ else:
836
+ loss_fct = CrossEntropyLoss(ignore_index=-100)
837
+ loss = loss_fct(shift_logits.view(-1, shift_logits.size(-1)), shift_labels.view(-1))
838
+
839
+ lm_logits = lm_logits.to(hidden_states.dtype)
840
+ loss = loss.to(hidden_states.dtype)
841
+
842
+ if not return_dict:
843
+ output = (lm_logits,) + transformer_outputs[1:]
844
+ return ((loss,) + output) if loss is not None else output
845
+
846
+ return CausalLMOutputWithPast(
847
+ loss=loss,
848
+ logits=lm_logits,
849
+ past_key_values=transformer_outputs.past_key_values,
850
+ hidden_states=transformer_outputs.hidden_states,
851
+ attentions=transformer_outputs.attentions,
852
+ )
853
+
854
+ @staticmethod
855
+ def _reorder_cache(
856
+ past: Tuple[Tuple[torch.Tensor, torch.Tensor], ...], beam_idx: torch.LongTensor
857
+ ) -> Tuple[Tuple[torch.Tensor, torch.Tensor], ...]:
858
+ """
859
+ This function is used to re-order the `past_key_values` cache if [`~PreTrainedModel.beam_search`] or
860
+ [`~PreTrainedModel.beam_sample`] is called. This is required to match `past_key_values` with the correct
861
+ beam_idx at every generation step.
862
+
863
+ Output shares the same memory storage as `past`.
864
+ """
865
+ return tuple(
866
+ (
867
+ layer_past[0].index_select(1, beam_idx.to(layer_past[0].device)),
868
+ layer_past[1].index_select(1, beam_idx.to(layer_past[1].device)),
869
+ )
870
+ for layer_past in past
871
+ )
872
+
873
+ def process_response(self, response):
874
+ response = response.strip()
875
+ response = response.replace("[[训练时间]]", "2023年")
876
+ return response
877
+
878
+ @torch.inference_mode()
879
+ def chat(self, tokenizer, query: str, history: List[Dict] = None, role: str = "user",
880
+ max_length: int = 8192, num_beams=1, do_sample=True, top_p=0.8, temperature=0.8, logits_processor=None,
881
+ **kwargs):
882
+ if history is None:
883
+ history = []
884
+ if logits_processor is None:
885
+ logits_processor = LogitsProcessorList()
886
+ logits_processor.append(InvalidScoreLogitsProcessor())
887
+ gen_kwargs = {"max_length": max_length, "num_beams": num_beams, "do_sample": do_sample, "top_p": top_p,
888
+ "temperature": temperature, "logits_processor": logits_processor, **kwargs}
889
+ inputs = tokenizer.build_chat_input(query, history=history, role=role)
890
+ inputs = inputs.to(self.device)
891
+ eos_token_id = [tokenizer.eos_token_id, tokenizer.get_command("<|user|>"),
892
+ tokenizer.get_command("<|observation|>")]
893
+ outputs = self.generate(**inputs, **gen_kwargs, eos_token_id=eos_token_id)
894
+ outputs = outputs.tolist()[0][len(inputs["input_ids"][0]):-1]
895
+ response = tokenizer.decode(outputs)
896
+ history.append({"role": role, "content": query})
897
+ response = self.process_response(response)
898
+ return response, history
smash_config.json ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "api_key": null,
3
+ "verify_url": "http://johnrachwan.pythonanywhere.com",
4
+ "smash_config": {
5
+ "pruners": "None",
6
+ "pruning_ratio": 0.0,
7
+ "factorizers": "None",
8
+ "quantizers": "['llm-int8']",
9
+ "weight_quantization_bits": 4,
10
+ "output_deviation": 0.005,
11
+ "compilers": "None",
12
+ "static_batch": true,
13
+ "static_shape": true,
14
+ "controlnet": "None",
15
+ "unet_dim": 4,
16
+ "device": "cuda",
17
+ "cache_dir": "/ceph/hdd/staff/charpent/.cache/modelsdhkyhu_n",
18
+ "batch_size": 1,
19
+ "model_name": "THUDM/LongWriter-glm4-9b",
20
+ "task": "text_text_generation",
21
+ "max_batch_size": 1,
22
+ "qtype_weight": "torch.qint8",
23
+ "qtype_activation": "torch.quint8",
24
+ "qobserver": "<class 'torch.ao.quantization.observer.MinMaxObserver'>",
25
+ "qscheme": "torch.per_tensor_symmetric",
26
+ "qconfig": "x86",
27
+ "group_size": 128,
28
+ "damp_percent": 0.1,
29
+ "save_load_fn": "bitsandbytes"
30
+ }
31
+ }
special_tokens_map.json ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "eos_token": {
3
+ "content": "<|endoftext|>",
4
+ "lstrip": false,
5
+ "normalized": false,
6
+ "rstrip": false,
7
+ "single_word": false
8
+ }
9
+ }
tokenizer.model ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5a493598071550244b2ee7f26118f3edec2150b9dfa967929a99052ac83fe716
3
+ size 2623634
tokenizer_config.json ADDED
@@ -0,0 +1,27 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "added_tokens_decoder": {
3
+ "151329": {
4
+ "content": "<|endoftext|>",
5
+ "lstrip": false,
6
+ "normalized": false,
7
+ "rstrip": false,
8
+ "single_word": false,
9
+ "special": true
10
+ }
11
+ },
12
+ "auto_map": {
13
+ "AutoTokenizer": [
14
+ "THUDM/LongWriter-glm4-9b--tokenization_chatglm.ChatGLM4Tokenizer",
15
+ null
16
+ ]
17
+ },
18
+ "chat_template": "{% for message in messages %}{% if loop.first %}[gMASK]sop<|{{ message['role'] }}|>\n {{ message['content'] }}{% else %}<|{{ message['role'] }}|>\n {{ message['content'] }}{% endif %}{% endfor %}{% if add_generation_prompt %}<|assistant|>{% endif %}",
19
+ "clean_up_tokenization_spaces": false,
20
+ "do_lower_case": false,
21
+ "eos_token": "<|endoftext|>",
22
+ "legacy": false,
23
+ "model_max_length": 1000000000000000019884624838656,
24
+ "padding_side": "left",
25
+ "remove_space": false,
26
+ "tokenizer_class": "ChatGLM4Tokenizer"
27
+ }