初始化项目,由ModelHub XC社区提供模型
Model: RedHatAI/Qwen3-30B-A3B-Instruct-2507-quantized.w8a8 Source: Original Platform
This commit is contained in:
36
.gitattributes
vendored
Normal file
36
.gitattributes
vendored
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.arrow filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.bin filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.ckpt filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.ftz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.h5 filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.joblib filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.lfs.* filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.mlmodel filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.model filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.msgpack filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.npy filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.npz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.onnx filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.ot filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.parquet filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.pb filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.pickle filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.pkl filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.pt filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.pth filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.rar filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.safetensors filter=lfs diff=lfs merge=lfs -text
|
||||||
|
saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tar.* filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tar filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tflite filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.wasm filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*.zst filter=lfs diff=lfs merge=lfs -text
|
||||||
|
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
||||||
|
tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
||||||
229
README.md
Normal file
229
README.md
Normal file
@@ -0,0 +1,229 @@
|
|||||||
|
---
|
||||||
|
library_name: transformers
|
||||||
|
license: apache-2.0
|
||||||
|
pipeline_tag: text-generation
|
||||||
|
base_model:
|
||||||
|
- Qwen/Qwen3-30B-A3B-Instruct-2507
|
||||||
|
tags:
|
||||||
|
- neuralmagic
|
||||||
|
- redhat
|
||||||
|
- llmcompressor
|
||||||
|
- quantized
|
||||||
|
- INT8
|
||||||
|
---
|
||||||
|
|
||||||
|
# Qwen3-30B-A3B-Instruct-2507.w8a8
|
||||||
|
|
||||||
|
## Model Overview
|
||||||
|
- **Model Architecture:** Qwen3ForCausalLM
|
||||||
|
- **Input:** Text
|
||||||
|
- **Output:** Text
|
||||||
|
- **Model Optimizations:**
|
||||||
|
- **Weight quantization:** INT8
|
||||||
|
- **Intended Use Cases:**
|
||||||
|
- Reasoning.
|
||||||
|
- Function calling.
|
||||||
|
- Subject matter experts via fine-tuning.
|
||||||
|
- Multilingual instruction following.
|
||||||
|
- Translation.
|
||||||
|
- **Out-of-scope:** Use in any manner that violates applicable laws or regulations (including trade compliance laws).
|
||||||
|
- **Release Date:** 05/05/2025
|
||||||
|
- **Version:** 1.0
|
||||||
|
- **Model Developers:** RedHat (Neural Magic)
|
||||||
|
|
||||||
|
### Model Optimizations
|
||||||
|
|
||||||
|
This model was obtained by quantizing the weights of [Qwen/Qwen3-30B-A3B-Instruct-2507](https://huggingface.co/Qwen/Qwen3-30B-A3B-Instruct-2507) to INT8 data type.
|
||||||
|
This optimization reduces the number of bits used to represent weights and activations from 16 to 8, reducing GPU memory requirements (by approximately 50%) and increasing matrix-multiply compute throughput (by approximately 2x).
|
||||||
|
Weight quantization also reduces disk size requirements by approximately 50%.
|
||||||
|
|
||||||
|
Only weights and activations of the linear operators within transformers blocks are quantized.
|
||||||
|
Weights are quantized with a symmetric static per-channel scheme, whereas activations are quantized with a symmetric dynamic per-token scheme.
|
||||||
|
A combination of the [SmoothQuant](https://arxiv.org/abs/2211.10438) and [GPTQ](https://arxiv.org/abs/2210.17323) algorithms is applied for quantization, as implemented in the [llm-compressor](https://github.com/vllm-project/llm-compressor) library.
|
||||||
|
|
||||||
|
|
||||||
|
## Deployment
|
||||||
|
|
||||||
|
This model can be deployed efficiently using the [vLLM](https://docs.vllm.ai/en/latest/) backend, as shown in the example below.
|
||||||
|
|
||||||
|
```python
|
||||||
|
from vllm import LLM, SamplingParams
|
||||||
|
from transformers import AutoTokenizer
|
||||||
|
|
||||||
|
model_id = "RedHatAI/Qwen3-30B-A3B-Instruct-2507.w8a8"
|
||||||
|
number_gpus = 1
|
||||||
|
sampling_params = SamplingParams(temperature=0.6, top_p=0.95, top_k=20, min_p=0, max_tokens=256)
|
||||||
|
|
||||||
|
messages = [
|
||||||
|
{"role": "user", "content": prompt}
|
||||||
|
]
|
||||||
|
|
||||||
|
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
||||||
|
|
||||||
|
messages = [{"role": "user", "content": "Give me a short introduction to large language model."}]
|
||||||
|
|
||||||
|
prompts = tokenizer.apply_chat_template(messages, add_generation_prompt=True, tokenize=False)
|
||||||
|
|
||||||
|
llm = LLM(model=model_id, tensor_parallel_size=number_gpus)
|
||||||
|
|
||||||
|
outputs = llm.generate(prompts, sampling_params)
|
||||||
|
|
||||||
|
generated_text = outputs[0].outputs[0].text
|
||||||
|
print(generated_text)
|
||||||
|
```
|
||||||
|
|
||||||
|
vLLM aslo supports OpenAI-compatible serving. See the [documentation](https://docs.vllm.ai/en/latest/) for more details.
|
||||||
|
|
||||||
|
## Creation
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary>Creation details</summary>
|
||||||
|
This model was created with [llm-compressor](https://github.com/vllm-project/llm-compressor) by running the code snippet below.
|
||||||
|
|
||||||
|
|
||||||
|
```python
|
||||||
|
from llmcompressor.modifiers.quantization import GPTQModifier
|
||||||
|
from llmcompressor.modifiers.smoothquant import SmoothQuantModifier
|
||||||
|
from llmcompressor.transformers import oneshot
|
||||||
|
from transformers import AutoModelForCausalLM, AutoTokenizer
|
||||||
|
|
||||||
|
# Load model
|
||||||
|
model_stub = "Qwen/Qwen3-30B-A3B-Instruct"
|
||||||
|
model_name = model_stub.split("/")[-1]
|
||||||
|
|
||||||
|
num_samples = 1024
|
||||||
|
max_seq_len = 8192
|
||||||
|
|
||||||
|
model = AutoModelForCausalLM.from_pretrained(model_stub)
|
||||||
|
|
||||||
|
tokenizer = AutoTokenizer.from_pretrained(model_stub)
|
||||||
|
|
||||||
|
def preprocess_fn(example):
|
||||||
|
return {"text": tokenizer.apply_chat_template(example["messages"], add_generation_prompt=False, tokenize=False)}
|
||||||
|
|
||||||
|
ds = load_dataset("neuralmagic/LLM_compression_calibration", split="train")
|
||||||
|
ds = ds.map(preprocess_fn)
|
||||||
|
|
||||||
|
# Configure the quantization algorithm and scheme
|
||||||
|
recipe = [
|
||||||
|
SmoothQuantModifier(
|
||||||
|
smoothing_strength=0.9,
|
||||||
|
mappings=[
|
||||||
|
[["re:.*q_proj", "re:.*k_proj", "re:.*v_proj"], "re:.*input_layernorm"],
|
||||||
|
],
|
||||||
|
),
|
||||||
|
GPTQModifier(
|
||||||
|
ignore: ["lm_head"]
|
||||||
|
config_groups={"group_0": {"targets": ["Linear"], "weights": { "num_bits": 4, "type": int, "strategy": "group", "group_size": 128, "symmetric": true, "dynamic": false, "observer": "mse" } } },
|
||||||
|
dampening_frac=0.1,
|
||||||
|
)
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
|
# Apply quantization
|
||||||
|
oneshot(
|
||||||
|
model=model,
|
||||||
|
dataset=ds,
|
||||||
|
recipe=recipe,
|
||||||
|
max_seq_length=max_seq_len,
|
||||||
|
num_calibration_samples=num_samples,
|
||||||
|
)
|
||||||
|
|
||||||
|
# Save to disk in compressed-tensors format
|
||||||
|
save_path = model_name + "-quantized.w8a8"
|
||||||
|
model.save_pretrained(save_path)
|
||||||
|
tokenizer.save_pretrained(save_path)
|
||||||
|
print(f"Model and tokenizer saved to: {save_path}")
|
||||||
|
```
|
||||||
|
</details>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## Evaluation
|
||||||
|
|
||||||
|
The model was evaluated on the ifeval, mmlu_pro and gsm8k_platinum using [lm-evaluation-harness](https://github.com/EleutherAI/lm-evaluation-harness), on reasoning tasks using [lighteval](https://github.com/neuralmagic/lighteval/tree/reasoning).
|
||||||
|
[vLLM](https://docs.vllm.ai/en/stable/) was used for all evaluations.
|
||||||
|
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary>Evaluation details</summary>
|
||||||
|
|
||||||
|
Deploy using vllm to create an OpenAI-compatible API endpoint:
|
||||||
|
|
||||||
|
- vLLM:
|
||||||
|
```shell
|
||||||
|
vllm serve RedHatAI/Qwen3-30B-A3B-Instruct-2507.w8a8 --max-model-len 262144
|
||||||
|
```
|
||||||
|
|
||||||
|
**lm-evaluation-harness**
|
||||||
|
```
|
||||||
|
lm_eval --model local-chat-completions \
|
||||||
|
--tasks mmlu_pro_chat \
|
||||||
|
--model_args "model=RedHatAI/Qwen3-30B-A3B-Instruct-2507.w8a8,max_length=262144,base_url=http://0.0.0.0:8000/v1/chat/completions,num_concurrent=64,max_retries=3,tokenized_requests=False,tokenizer_backend=None,timeout=1200" \
|
||||||
|
--num_fewshot 0 \
|
||||||
|
--apply_chat_template \
|
||||||
|
--gen_kwargs "do_sample=True,temperature=0.6,top_p=0.95,top_k=20,min_p=0.0,max_gen_toks=64000
|
||||||
|
```
|
||||||
|
|
||||||
|
```
|
||||||
|
lm_eval --model local-chat-completions \
|
||||||
|
--tasks ifeval \
|
||||||
|
--model_args "model=RedHatAI/Qwen3-30B-A3B-Instruct-2507.w8a8,max_length=262144,base_url=http://0.0.0.0:8000/v1/chat/completions,num_concurrent=64,max_retries=3,tokenized_requests=False,tokenizer_backend=None,timeout=1200" \
|
||||||
|
--num_fewshot 0 \
|
||||||
|
--apply_chat_template \
|
||||||
|
--gen_kwargs "do_sample=True,temperature=0.6,top_p=0.95,top_k=20,min_p=0.0,max_gen_toks=64000
|
||||||
|
```
|
||||||
|
|
||||||
|
```
|
||||||
|
lm_eval --model local-chat-completions \
|
||||||
|
--tasks mmlu_cot_llama \
|
||||||
|
--model_args "model=RedHatAI/Qwen3-30B-A3B-Instruct-2507.w8a8,max_length=262144,base_url=http://0.0.0.0:8000/v1/chat/completions,num_concurrent=64,max_retries=3,tokenized_requests=False,tokenizer_backend=None,timeout=1200" \
|
||||||
|
--num_fewshot 0 \
|
||||||
|
--apply_chat_template \
|
||||||
|
--gen_kwargs "do_sample=True,temperature=0.6,top_p=0.95,top_k=20,min_p=0.0,max_gen_toks=64000
|
||||||
|
```
|
||||||
|
|
||||||
|
```
|
||||||
|
lm_eval --model local-chat-completions \
|
||||||
|
--tasks gsm8k_platinum_cot_llama \
|
||||||
|
--model_args "model=RedHatAI/Qwen3-30B-A3B-Instruct-2507.w8a8,max_length=262144,base_url=http://0.0.0.0:8000/v1/chat/completions,num_concurrent=64,max_retries=3,tokenized_requests=False,tokenizer_backend=None,timeout=1200" \
|
||||||
|
--num_fewshot 0 \
|
||||||
|
--apply_chat_template \
|
||||||
|
--gen_kwargs "do_sample=True,temperature=0.6,top_p=0.95,top_k=20,min_p=0.0,max_gen_toks=64000
|
||||||
|
```
|
||||||
|
|
||||||
|
**lighteval**
|
||||||
|
|
||||||
|
lighteval_model_arguments.yaml
|
||||||
|
```yaml
|
||||||
|
model_parameters:
|
||||||
|
model_name: RedHatAI/Qwen3-30B-A3B-Instruct-2507.w8a8
|
||||||
|
dtype: auto
|
||||||
|
gpu_memory_utilization: 0.9
|
||||||
|
max_model_length: 40960
|
||||||
|
generation_parameters:
|
||||||
|
temperature: 0.6
|
||||||
|
top_k: 20
|
||||||
|
min_p: 0.0
|
||||||
|
top_p: 0.95
|
||||||
|
max_new_tokens: 32000
|
||||||
|
```
|
||||||
|
|
||||||
|
```
|
||||||
|
lighteval endpoint litellm lighteval_model_arguments.yaml \
|
||||||
|
"aime25|0,math_500|0,gpqa:diamond|0"
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
### Accuracy
|
||||||
|
|
||||||
|
|
||||||
|
| Benchmark | Qwen3-30B-A3B Instruct | Qwen3-30B-A3B Instruct.w8a8 (this model) | Recovery (%) |
|
||||||
|
|--------|-------------|-------------------|--------------|
|
||||||
|
| GSM8k Platinum (5-shot) | 96.11 | 97.57 | 101.52 |
|
||||||
|
| MMLU-Cot (5-shot) | 84.29 | 84.30 | 100.02 |
|
||||||
|
| MMLU-Pro (5-shot) | 78.90 | 78.81 | 99.89 |
|
||||||
|
| IfEval | 89.13 | 88.89 | 99.73 |
|
||||||
|
| Math 500 | 89.91 | 90.48 | 100.62 |
|
||||||
28
added_tokens.json
Normal file
28
added_tokens.json
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
{
|
||||||
|
"</think>": 151668,
|
||||||
|
"</tool_call>": 151658,
|
||||||
|
"</tool_response>": 151666,
|
||||||
|
"<think>": 151667,
|
||||||
|
"<tool_call>": 151657,
|
||||||
|
"<tool_response>": 151665,
|
||||||
|
"<|box_end|>": 151649,
|
||||||
|
"<|box_start|>": 151648,
|
||||||
|
"<|endoftext|>": 151643,
|
||||||
|
"<|file_sep|>": 151664,
|
||||||
|
"<|fim_middle|>": 151660,
|
||||||
|
"<|fim_pad|>": 151662,
|
||||||
|
"<|fim_prefix|>": 151659,
|
||||||
|
"<|fim_suffix|>": 151661,
|
||||||
|
"<|im_end|>": 151645,
|
||||||
|
"<|im_start|>": 151644,
|
||||||
|
"<|image_pad|>": 151655,
|
||||||
|
"<|object_ref_end|>": 151647,
|
||||||
|
"<|object_ref_start|>": 151646,
|
||||||
|
"<|quad_end|>": 151651,
|
||||||
|
"<|quad_start|>": 151650,
|
||||||
|
"<|repo_name|>": 151663,
|
||||||
|
"<|video_pad|>": 151656,
|
||||||
|
"<|vision_end|>": 151653,
|
||||||
|
"<|vision_pad|>": 151654,
|
||||||
|
"<|vision_start|>": 151652
|
||||||
|
}
|
||||||
61
chat_template.jinja
Normal file
61
chat_template.jinja
Normal file
@@ -0,0 +1,61 @@
|
|||||||
|
{%- if tools %}
|
||||||
|
{{- '<|im_start|>system\n' }}
|
||||||
|
{%- if messages[0].role == 'system' %}
|
||||||
|
{{- messages[0].content + '\n\n' }}
|
||||||
|
{%- endif %}
|
||||||
|
{{- "# Tools\n\nYou may call one or more functions to assist with the user query.\n\nYou are provided with function signatures within <tools></tools> XML tags:\n<tools>" }}
|
||||||
|
{%- for tool in tools %}
|
||||||
|
{{- "\n" }}
|
||||||
|
{{- tool | tojson }}
|
||||||
|
{%- endfor %}
|
||||||
|
{{- "\n</tools>\n\nFor each function call, return a json object with function name and arguments within <tool_call></tool_call> XML tags:\n<tool_call>\n{\"name\": <function-name>, \"arguments\": <args-json-object>}\n</tool_call><|im_end|>\n" }}
|
||||||
|
{%- else %}
|
||||||
|
{%- if messages[0].role == 'system' %}
|
||||||
|
{{- '<|im_start|>system\n' + messages[0].content + '<|im_end|>\n' }}
|
||||||
|
{%- endif %}
|
||||||
|
{%- endif %}
|
||||||
|
{%- for message in messages %}
|
||||||
|
{%- if message.content is string %}
|
||||||
|
{%- set content = message.content %}
|
||||||
|
{%- else %}
|
||||||
|
{%- set content = '' %}
|
||||||
|
{%- endif %}
|
||||||
|
{%- if (message.role == "user") or (message.role == "system" and not loop.first) %}
|
||||||
|
{{- '<|im_start|>' + message.role + '\n' + content + '<|im_end|>' + '\n' }}
|
||||||
|
{%- elif message.role == "assistant" %}
|
||||||
|
{{- '<|im_start|>' + message.role + '\n' + content }}
|
||||||
|
{%- if message.tool_calls %}
|
||||||
|
{%- for tool_call in message.tool_calls %}
|
||||||
|
{%- if (loop.first and content) or (not loop.first) %}
|
||||||
|
{{- '\n' }}
|
||||||
|
{%- endif %}
|
||||||
|
{%- if tool_call.function %}
|
||||||
|
{%- set tool_call = tool_call.function %}
|
||||||
|
{%- endif %}
|
||||||
|
{{- '<tool_call>\n{"name": "' }}
|
||||||
|
{{- tool_call.name }}
|
||||||
|
{{- '", "arguments": ' }}
|
||||||
|
{%- if tool_call.arguments is string %}
|
||||||
|
{{- tool_call.arguments }}
|
||||||
|
{%- else %}
|
||||||
|
{{- tool_call.arguments | tojson }}
|
||||||
|
{%- endif %}
|
||||||
|
{{- '}\n</tool_call>' }}
|
||||||
|
{%- endfor %}
|
||||||
|
{%- endif %}
|
||||||
|
{{- '<|im_end|>\n' }}
|
||||||
|
{%- elif message.role == "tool" %}
|
||||||
|
{%- if loop.first or (messages[loop.index0 - 1].role != "tool") %}
|
||||||
|
{{- '<|im_start|>user' }}
|
||||||
|
{%- endif %}
|
||||||
|
{{- '\n<tool_response>\n' }}
|
||||||
|
{{- content }}
|
||||||
|
{{- '\n</tool_response>' }}
|
||||||
|
{%- if loop.last or (messages[loop.index0 + 1].role != "tool") %}
|
||||||
|
{{- '<|im_end|>\n' }}
|
||||||
|
{%- endif %}
|
||||||
|
{%- endif %}
|
||||||
|
{%- endfor %}
|
||||||
|
{%- if add_generation_prompt %}
|
||||||
|
{{- '<|im_start|>assistant\n' }}
|
||||||
|
{%- endif %}
|
||||||
132
config.json
Normal file
132
config.json
Normal file
@@ -0,0 +1,132 @@
|
|||||||
|
{
|
||||||
|
"architectures": [
|
||||||
|
"Qwen3MoeForCausalLM"
|
||||||
|
],
|
||||||
|
"attention_bias": false,
|
||||||
|
"attention_dropout": 0.0,
|
||||||
|
"bos_token_id": 151643,
|
||||||
|
"decoder_sparse_step": 1,
|
||||||
|
"dtype": "bfloat16",
|
||||||
|
"eos_token_id": 151645,
|
||||||
|
"head_dim": 128,
|
||||||
|
"hidden_act": "silu",
|
||||||
|
"hidden_size": 2048,
|
||||||
|
"initializer_range": 0.02,
|
||||||
|
"intermediate_size": 6144,
|
||||||
|
"max_position_embeddings": 262144,
|
||||||
|
"max_window_layers": 48,
|
||||||
|
"mlp_only_layers": [],
|
||||||
|
"model_type": "qwen3_moe",
|
||||||
|
"moe_intermediate_size": 768,
|
||||||
|
"norm_topk_prob": true,
|
||||||
|
"num_attention_heads": 32,
|
||||||
|
"num_experts": 128,
|
||||||
|
"num_experts_per_tok": 8,
|
||||||
|
"num_hidden_layers": 48,
|
||||||
|
"num_key_value_heads": 4,
|
||||||
|
"output_router_logits": false,
|
||||||
|
"quantization_config": {
|
||||||
|
"config_groups": {
|
||||||
|
"group_0": {
|
||||||
|
"format": "int-quantized",
|
||||||
|
"input_activations": {
|
||||||
|
"actorder": null,
|
||||||
|
"block_structure": null,
|
||||||
|
"dynamic": true,
|
||||||
|
"group_size": null,
|
||||||
|
"num_bits": 8,
|
||||||
|
"observer": null,
|
||||||
|
"observer_kwargs": {},
|
||||||
|
"strategy": "token",
|
||||||
|
"symmetric": true,
|
||||||
|
"type": "int"
|
||||||
|
},
|
||||||
|
"output_activations": null,
|
||||||
|
"targets": [
|
||||||
|
"Linear"
|
||||||
|
],
|
||||||
|
"weights": {
|
||||||
|
"actorder": null,
|
||||||
|
"block_structure": null,
|
||||||
|
"dynamic": false,
|
||||||
|
"group_size": null,
|
||||||
|
"num_bits": 8,
|
||||||
|
"observer": "mse",
|
||||||
|
"observer_kwargs": {},
|
||||||
|
"strategy": "channel",
|
||||||
|
"symmetric": true,
|
||||||
|
"type": "int"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"format": "int-quantized",
|
||||||
|
"global_compression_ratio": null,
|
||||||
|
"ignore": [
|
||||||
|
"model.layers.0.mlp.gate",
|
||||||
|
"model.layers.1.mlp.gate",
|
||||||
|
"model.layers.2.mlp.gate",
|
||||||
|
"model.layers.3.mlp.gate",
|
||||||
|
"model.layers.4.mlp.gate",
|
||||||
|
"model.layers.5.mlp.gate",
|
||||||
|
"model.layers.6.mlp.gate",
|
||||||
|
"model.layers.7.mlp.gate",
|
||||||
|
"model.layers.8.mlp.gate",
|
||||||
|
"model.layers.9.mlp.gate",
|
||||||
|
"model.layers.10.mlp.gate",
|
||||||
|
"model.layers.11.mlp.gate",
|
||||||
|
"model.layers.12.mlp.gate",
|
||||||
|
"model.layers.13.mlp.gate",
|
||||||
|
"model.layers.14.mlp.gate",
|
||||||
|
"model.layers.15.mlp.gate",
|
||||||
|
"model.layers.16.mlp.gate",
|
||||||
|
"model.layers.17.mlp.gate",
|
||||||
|
"model.layers.18.mlp.gate",
|
||||||
|
"model.layers.19.mlp.gate",
|
||||||
|
"model.layers.20.mlp.gate",
|
||||||
|
"model.layers.21.mlp.gate",
|
||||||
|
"model.layers.22.mlp.gate",
|
||||||
|
"model.layers.23.mlp.gate",
|
||||||
|
"model.layers.24.mlp.gate",
|
||||||
|
"model.layers.25.mlp.gate",
|
||||||
|
"model.layers.26.mlp.gate",
|
||||||
|
"model.layers.27.mlp.gate",
|
||||||
|
"model.layers.28.mlp.gate",
|
||||||
|
"model.layers.29.mlp.gate",
|
||||||
|
"model.layers.30.mlp.gate",
|
||||||
|
"model.layers.31.mlp.gate",
|
||||||
|
"model.layers.32.mlp.gate",
|
||||||
|
"model.layers.33.mlp.gate",
|
||||||
|
"model.layers.34.mlp.gate",
|
||||||
|
"model.layers.35.mlp.gate",
|
||||||
|
"model.layers.36.mlp.gate",
|
||||||
|
"model.layers.37.mlp.gate",
|
||||||
|
"model.layers.38.mlp.gate",
|
||||||
|
"model.layers.39.mlp.gate",
|
||||||
|
"model.layers.40.mlp.gate",
|
||||||
|
"model.layers.41.mlp.gate",
|
||||||
|
"model.layers.42.mlp.gate",
|
||||||
|
"model.layers.43.mlp.gate",
|
||||||
|
"model.layers.44.mlp.gate",
|
||||||
|
"model.layers.45.mlp.gate",
|
||||||
|
"model.layers.46.mlp.gate",
|
||||||
|
"model.layers.47.mlp.gate",
|
||||||
|
"lm_head"
|
||||||
|
],
|
||||||
|
"kv_cache_scheme": null,
|
||||||
|
"quant_method": "compressed-tensors",
|
||||||
|
"quantization_status": "compressed",
|
||||||
|
"sparsity_config": {},
|
||||||
|
"transform_config": {},
|
||||||
|
"version": "0.13.0"
|
||||||
|
},
|
||||||
|
"rms_norm_eps": 1e-06,
|
||||||
|
"rope_scaling": null,
|
||||||
|
"rope_theta": 10000000,
|
||||||
|
"router_aux_loss_coef": 0.001,
|
||||||
|
"sliding_window": null,
|
||||||
|
"tie_word_embeddings": false,
|
||||||
|
"transformers_version": "4.57.3",
|
||||||
|
"use_cache": true,
|
||||||
|
"use_sliding_window": false,
|
||||||
|
"vocab_size": 151936
|
||||||
|
}
|
||||||
13
generation_config.json
Normal file
13
generation_config.json
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
{
|
||||||
|
"bos_token_id": 151643,
|
||||||
|
"do_sample": true,
|
||||||
|
"eos_token_id": [
|
||||||
|
151645,
|
||||||
|
151643
|
||||||
|
],
|
||||||
|
"pad_token_id": 151643,
|
||||||
|
"temperature": 0.7,
|
||||||
|
"top_k": 20,
|
||||||
|
"top_p": 0.8,
|
||||||
|
"transformers_version": "4.57.3"
|
||||||
|
}
|
||||||
151388
merges.txt
Normal file
151388
merges.txt
Normal file
File diff suppressed because it is too large
Load Diff
3
model-00001-of-00007.safetensors
Normal file
3
model-00001-of-00007.safetensors
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:ae1158228d4829f775718d6676460386b709a9ed932d9405ee89eaa2363544f1
|
||||||
|
size 4993234720
|
||||||
3
model-00002-of-00007.safetensors
Normal file
3
model-00002-of-00007.safetensors
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:460bf3750c4a83b5405bb0c1c5c9b886d8e490b6ad7d72cb9cf8ff9d9b04744d
|
||||||
|
size 4995310176
|
||||||
3
model-00003-of-00007.safetensors
Normal file
3
model-00003-of-00007.safetensors
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:f20741626f7f282b6c81db6f657403f04d03d169cd1a1d4b777e5b4f41e9e83b
|
||||||
|
size 4995312520
|
||||||
3
model-00004-of-00007.safetensors
Normal file
3
model-00004-of-00007.safetensors
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:f66ed11576877c41a4503bba2528e8c4edd6c61398c17964499687ec738f5fe9
|
||||||
|
size 4995312520
|
||||||
3
model-00005-of-00007.safetensors
Normal file
3
model-00005-of-00007.safetensors
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:2155f8a4aa852535adfd8c3188ad817f0c74c379eaf9218c51256ea8c718b1bc
|
||||||
|
size 4995312520
|
||||||
3
model-00006-of-00007.safetensors
Normal file
3
model-00006-of-00007.safetensors
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:0ad128dd5176377d5863aa99779ae9e2545c81f96bb00c2654d1adc90c83e843
|
||||||
|
size 4995312520
|
||||||
3
model-00007-of-00007.safetensors
Normal file
3
model-00007-of-00007.safetensors
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:98f18c94d0b8567ef64a374aa0b0e94c9764cb3100f512010f1bd723a48e275e
|
||||||
|
size 1246749496
|
||||||
37499
model.safetensors.index.json
Normal file
37499
model.safetensors.index.json
Normal file
File diff suppressed because it is too large
Load Diff
46
recipe.yaml
Normal file
46
recipe.yaml
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
quant_stage:
|
||||||
|
quant_modifiers:
|
||||||
|
SmoothQuantModifier:
|
||||||
|
smoothing_strength: 0.7
|
||||||
|
mappings:
|
||||||
|
- - ['re:.*q_proj', 're:.*k_proj', 're:.*v_proj']
|
||||||
|
- re:.*input_layernorm
|
||||||
|
ignore: []
|
||||||
|
GPTQModifier:
|
||||||
|
config_groups:
|
||||||
|
group_0:
|
||||||
|
targets: [Linear]
|
||||||
|
weights:
|
||||||
|
num_bits: 8
|
||||||
|
type: int
|
||||||
|
symmetric: true
|
||||||
|
group_size: null
|
||||||
|
strategy: channel
|
||||||
|
block_structure: null
|
||||||
|
dynamic: false
|
||||||
|
actorder: null
|
||||||
|
scale_dtype: null
|
||||||
|
zp_dtype: null
|
||||||
|
observer: mse
|
||||||
|
observer_kwargs: {}
|
||||||
|
input_activations:
|
||||||
|
num_bits: 8
|
||||||
|
type: int
|
||||||
|
symmetric: true
|
||||||
|
group_size: null
|
||||||
|
strategy: token
|
||||||
|
block_structure: null
|
||||||
|
dynamic: true
|
||||||
|
actorder: null
|
||||||
|
scale_dtype: null
|
||||||
|
zp_dtype: null
|
||||||
|
observer: null
|
||||||
|
observer_kwargs: {}
|
||||||
|
output_activations: null
|
||||||
|
format: null
|
||||||
|
targets: [Linear]
|
||||||
|
ignore: [lm_head, 're:.*mlp.gate$', 're:.*mlp.shared_expert_gate$']
|
||||||
|
block_size: 128
|
||||||
|
dampening_frac: 0.1
|
||||||
|
actorder: static
|
||||||
|
offload_hessians: false
|
||||||
31
special_tokens_map.json
Normal file
31
special_tokens_map.json
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
{
|
||||||
|
"additional_special_tokens": [
|
||||||
|
"<|im_start|>",
|
||||||
|
"<|im_end|>",
|
||||||
|
"<|object_ref_start|>",
|
||||||
|
"<|object_ref_end|>",
|
||||||
|
"<|box_start|>",
|
||||||
|
"<|box_end|>",
|
||||||
|
"<|quad_start|>",
|
||||||
|
"<|quad_end|>",
|
||||||
|
"<|vision_start|>",
|
||||||
|
"<|vision_end|>",
|
||||||
|
"<|vision_pad|>",
|
||||||
|
"<|image_pad|>",
|
||||||
|
"<|video_pad|>"
|
||||||
|
],
|
||||||
|
"eos_token": {
|
||||||
|
"content": "<|im_end|>",
|
||||||
|
"lstrip": false,
|
||||||
|
"normalized": false,
|
||||||
|
"rstrip": false,
|
||||||
|
"single_word": false
|
||||||
|
},
|
||||||
|
"pad_token": {
|
||||||
|
"content": "<|endoftext|>",
|
||||||
|
"lstrip": false,
|
||||||
|
"normalized": false,
|
||||||
|
"rstrip": false,
|
||||||
|
"single_word": false
|
||||||
|
}
|
||||||
|
}
|
||||||
3
tokenizer.json
Normal file
3
tokenizer.json
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:aeb13307a71acd8fe81861d94ad54ab689df773318809eed3cbe794b4492dae4
|
||||||
|
size 11422654
|
||||||
239
tokenizer_config.json
Normal file
239
tokenizer_config.json
Normal file
@@ -0,0 +1,239 @@
|
|||||||
|
{
|
||||||
|
"add_bos_token": false,
|
||||||
|
"add_prefix_space": false,
|
||||||
|
"added_tokens_decoder": {
|
||||||
|
"151643": {
|
||||||
|
"content": "<|endoftext|>",
|
||||||
|
"lstrip": false,
|
||||||
|
"normalized": false,
|
||||||
|
"rstrip": false,
|
||||||
|
"single_word": false,
|
||||||
|
"special": true
|
||||||
|
},
|
||||||
|
"151644": {
|
||||||
|
"content": "<|im_start|>",
|
||||||
|
"lstrip": false,
|
||||||
|
"normalized": false,
|
||||||
|
"rstrip": false,
|
||||||
|
"single_word": false,
|
||||||
|
"special": true
|
||||||
|
},
|
||||||
|
"151645": {
|
||||||
|
"content": "<|im_end|>",
|
||||||
|
"lstrip": false,
|
||||||
|
"normalized": false,
|
||||||
|
"rstrip": false,
|
||||||
|
"single_word": false,
|
||||||
|
"special": true
|
||||||
|
},
|
||||||
|
"151646": {
|
||||||
|
"content": "<|object_ref_start|>",
|
||||||
|
"lstrip": false,
|
||||||
|
"normalized": false,
|
||||||
|
"rstrip": false,
|
||||||
|
"single_word": false,
|
||||||
|
"special": true
|
||||||
|
},
|
||||||
|
"151647": {
|
||||||
|
"content": "<|object_ref_end|>",
|
||||||
|
"lstrip": false,
|
||||||
|
"normalized": false,
|
||||||
|
"rstrip": false,
|
||||||
|
"single_word": false,
|
||||||
|
"special": true
|
||||||
|
},
|
||||||
|
"151648": {
|
||||||
|
"content": "<|box_start|>",
|
||||||
|
"lstrip": false,
|
||||||
|
"normalized": false,
|
||||||
|
"rstrip": false,
|
||||||
|
"single_word": false,
|
||||||
|
"special": true
|
||||||
|
},
|
||||||
|
"151649": {
|
||||||
|
"content": "<|box_end|>",
|
||||||
|
"lstrip": false,
|
||||||
|
"normalized": false,
|
||||||
|
"rstrip": false,
|
||||||
|
"single_word": false,
|
||||||
|
"special": true
|
||||||
|
},
|
||||||
|
"151650": {
|
||||||
|
"content": "<|quad_start|>",
|
||||||
|
"lstrip": false,
|
||||||
|
"normalized": false,
|
||||||
|
"rstrip": false,
|
||||||
|
"single_word": false,
|
||||||
|
"special": true
|
||||||
|
},
|
||||||
|
"151651": {
|
||||||
|
"content": "<|quad_end|>",
|
||||||
|
"lstrip": false,
|
||||||
|
"normalized": false,
|
||||||
|
"rstrip": false,
|
||||||
|
"single_word": false,
|
||||||
|
"special": true
|
||||||
|
},
|
||||||
|
"151652": {
|
||||||
|
"content": "<|vision_start|>",
|
||||||
|
"lstrip": false,
|
||||||
|
"normalized": false,
|
||||||
|
"rstrip": false,
|
||||||
|
"single_word": false,
|
||||||
|
"special": true
|
||||||
|
},
|
||||||
|
"151653": {
|
||||||
|
"content": "<|vision_end|>",
|
||||||
|
"lstrip": false,
|
||||||
|
"normalized": false,
|
||||||
|
"rstrip": false,
|
||||||
|
"single_word": false,
|
||||||
|
"special": true
|
||||||
|
},
|
||||||
|
"151654": {
|
||||||
|
"content": "<|vision_pad|>",
|
||||||
|
"lstrip": false,
|
||||||
|
"normalized": false,
|
||||||
|
"rstrip": false,
|
||||||
|
"single_word": false,
|
||||||
|
"special": true
|
||||||
|
},
|
||||||
|
"151655": {
|
||||||
|
"content": "<|image_pad|>",
|
||||||
|
"lstrip": false,
|
||||||
|
"normalized": false,
|
||||||
|
"rstrip": false,
|
||||||
|
"single_word": false,
|
||||||
|
"special": true
|
||||||
|
},
|
||||||
|
"151656": {
|
||||||
|
"content": "<|video_pad|>",
|
||||||
|
"lstrip": false,
|
||||||
|
"normalized": false,
|
||||||
|
"rstrip": false,
|
||||||
|
"single_word": false,
|
||||||
|
"special": true
|
||||||
|
},
|
||||||
|
"151657": {
|
||||||
|
"content": "<tool_call>",
|
||||||
|
"lstrip": false,
|
||||||
|
"normalized": false,
|
||||||
|
"rstrip": false,
|
||||||
|
"single_word": false,
|
||||||
|
"special": false
|
||||||
|
},
|
||||||
|
"151658": {
|
||||||
|
"content": "</tool_call>",
|
||||||
|
"lstrip": false,
|
||||||
|
"normalized": false,
|
||||||
|
"rstrip": false,
|
||||||
|
"single_word": false,
|
||||||
|
"special": false
|
||||||
|
},
|
||||||
|
"151659": {
|
||||||
|
"content": "<|fim_prefix|>",
|
||||||
|
"lstrip": false,
|
||||||
|
"normalized": false,
|
||||||
|
"rstrip": false,
|
||||||
|
"single_word": false,
|
||||||
|
"special": false
|
||||||
|
},
|
||||||
|
"151660": {
|
||||||
|
"content": "<|fim_middle|>",
|
||||||
|
"lstrip": false,
|
||||||
|
"normalized": false,
|
||||||
|
"rstrip": false,
|
||||||
|
"single_word": false,
|
||||||
|
"special": false
|
||||||
|
},
|
||||||
|
"151661": {
|
||||||
|
"content": "<|fim_suffix|>",
|
||||||
|
"lstrip": false,
|
||||||
|
"normalized": false,
|
||||||
|
"rstrip": false,
|
||||||
|
"single_word": false,
|
||||||
|
"special": false
|
||||||
|
},
|
||||||
|
"151662": {
|
||||||
|
"content": "<|fim_pad|>",
|
||||||
|
"lstrip": false,
|
||||||
|
"normalized": false,
|
||||||
|
"rstrip": false,
|
||||||
|
"single_word": false,
|
||||||
|
"special": false
|
||||||
|
},
|
||||||
|
"151663": {
|
||||||
|
"content": "<|repo_name|>",
|
||||||
|
"lstrip": false,
|
||||||
|
"normalized": false,
|
||||||
|
"rstrip": false,
|
||||||
|
"single_word": false,
|
||||||
|
"special": false
|
||||||
|
},
|
||||||
|
"151664": {
|
||||||
|
"content": "<|file_sep|>",
|
||||||
|
"lstrip": false,
|
||||||
|
"normalized": false,
|
||||||
|
"rstrip": false,
|
||||||
|
"single_word": false,
|
||||||
|
"special": false
|
||||||
|
},
|
||||||
|
"151665": {
|
||||||
|
"content": "<tool_response>",
|
||||||
|
"lstrip": false,
|
||||||
|
"normalized": false,
|
||||||
|
"rstrip": false,
|
||||||
|
"single_word": false,
|
||||||
|
"special": false
|
||||||
|
},
|
||||||
|
"151666": {
|
||||||
|
"content": "</tool_response>",
|
||||||
|
"lstrip": false,
|
||||||
|
"normalized": false,
|
||||||
|
"rstrip": false,
|
||||||
|
"single_word": false,
|
||||||
|
"special": false
|
||||||
|
},
|
||||||
|
"151667": {
|
||||||
|
"content": "<think>",
|
||||||
|
"lstrip": false,
|
||||||
|
"normalized": false,
|
||||||
|
"rstrip": false,
|
||||||
|
"single_word": false,
|
||||||
|
"special": false
|
||||||
|
},
|
||||||
|
"151668": {
|
||||||
|
"content": "</think>",
|
||||||
|
"lstrip": false,
|
||||||
|
"normalized": false,
|
||||||
|
"rstrip": false,
|
||||||
|
"single_word": false,
|
||||||
|
"special": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"additional_special_tokens": [
|
||||||
|
"<|im_start|>",
|
||||||
|
"<|im_end|>",
|
||||||
|
"<|object_ref_start|>",
|
||||||
|
"<|object_ref_end|>",
|
||||||
|
"<|box_start|>",
|
||||||
|
"<|box_end|>",
|
||||||
|
"<|quad_start|>",
|
||||||
|
"<|quad_end|>",
|
||||||
|
"<|vision_start|>",
|
||||||
|
"<|vision_end|>",
|
||||||
|
"<|vision_pad|>",
|
||||||
|
"<|image_pad|>",
|
||||||
|
"<|video_pad|>"
|
||||||
|
],
|
||||||
|
"bos_token": null,
|
||||||
|
"clean_up_tokenization_spaces": false,
|
||||||
|
"eos_token": "<|im_end|>",
|
||||||
|
"errors": "replace",
|
||||||
|
"extra_special_tokens": {},
|
||||||
|
"model_max_length": 1010000,
|
||||||
|
"pad_token": "<|endoftext|>",
|
||||||
|
"split_special_tokens": false,
|
||||||
|
"tokenizer_class": "Qwen2Tokenizer",
|
||||||
|
"unk_token": null
|
||||||
|
}
|
||||||
1
vocab.json
Normal file
1
vocab.json
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user