初始化项目,由ModelHub XC社区提供模型

Model: foss22/pruned26L-RuadaptQwen3-4B-10L
Source: Original Platform
This commit is contained in:
ModelHub XC
2026-07-17 22:09:14 +08:00
commit 0b10ebe770
11 changed files with 529 additions and 0 deletions

36
.gitattributes vendored Normal file
View 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

240
README.md Normal file
View File

@@ -0,0 +1,240 @@
---
library_name: transformers
tags: []
---
# Model Card for Model ID
<!-- Provide a quick summary of what the model is/does. -->
## Model Details
### Model Description
Removing 26 layers from RefalMachine/RuadaptQwen3-4B-Instruct ===
Parameters: 4,007,937,536
Layers: 36
--- Original Model Generation ---
Prompt: 'Paris is the capital of'
Generated: Paris is the capital of France and one of the world's most visited cities, attracting over 22 million tourists annually. It is renowned for its rich history, iconic landmarks, and vibrant cultural scene. Located in the north-central part of metropolitan France
Prompt: 'The theory of relativity states that'
Generated: The theory of relativity states that the speed of light in a vacuum is constant for all observers, regardless of their motion or the motion of the light source. However, when light travels through a medium such as water or glass, its speed decreases.
Removing layers: 100%|██████████| 36/36 [00:00<00:00, 235194.62it/s]
--- Pruned Model: RefalMachine/RuadaptQwen3-4B-Instruct
Parameters: 1,383,736,320
Layers: 10
--- Pruning Results ---
Parameter reduction: 2,624,201,216 (65.48%)
Layer reduction: 26 layers (72.22%)
--- Pruned Model Generation ---
Prompt: 'Paris is the capital of'
Generated: Paris is the capital ofmindlessamenterics getArguments argumentsстаходходсякаясясякийкийломовскийowskiowskiкуроновavirus pandemic pandemicінийскийскийскомановсяkosсяскойскомскийломецкийばшиестьяжиковикованов
Prompt: 'The theory of relativity states that'
Generated: The theory of relativity states thatophys physicists physicistsэнсяENCEScapeable measurable measurableizableizable Technologiescape знанияведенияведениячинстваствоствастваствутуKENkenohanaотовкаясяся......
?
?(fulnessfulamentericsallymenteamente Swal Swal
Example 1 completed! Parameter reduction: 65.48%
DEPTH PRUNING RESULTS SUMMARY
======================================================================
Model Method Param Reduction Layers Removed
----------------------------------------------------------------------
RefalMachine/RuadaptQwen3-4B-Instruct Layer Count 65.48 % 26/36
RefalMachine/RuadaptQwen3-4B-Instruct Percentage 70.51 % 28/36
Total examples tested: 2
Depth pruning examples completed successfully!
- **Developed by:** [More Information Needed]
- **Funded by [optional]:** [More Information Needed]
- **Shared by [optional]:** [More Information Needed]
- **Model type:** [More Information Needed]
- **Language(s) (NLP):** [More Information Needed]
- **License:** [More Information Needed]
- **Finetuned from model [optional]:** [More Information Needed]
### Model Sources [optional]
<!-- Provide the basic links for the model. -->
- **Repository:** [More Information Needed]
- **Paper [optional]:** [More Information Needed] Apache 2, same as https://github.com/peremartra/optipfair
- **Demo [optional]:** [More Information Needed]
## Uses
<!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
### Direct Use
<!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
[More Information Needed]
### Downstream Use [optional]
<!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
[More Information Needed]
### Out-of-Scope Use
<!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
[More Information Needed]
## Bias, Risks, and Limitations
<!-- This section is meant to convey both technical and sociotechnical limitations. -->
[More Information Needed]
### Recommendations
<!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
## How to Get Started with the Model
Use the code below to get started with the model.
[More Information Needed]
## Training Details
### Training Data
<!-- This should link to a Dataset Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. -->
[More Information Needed]
### Training Procedure
<!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
#### Preprocessing [optional]
[More Information Needed]
#### Training Hyperparameters
- **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
#### Speeds, Sizes, Times [optional]
<!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
[More Information Needed]
## Evaluation
<!-- This section describes the evaluation protocols and provides the results. -->
### Testing Data, Factors & Metrics
#### Testing Data
<!-- This should link to a Dataset Card if possible. -->
[More Information Needed]
#### Factors
<!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
[More Information Needed]
#### Metrics
<!-- These are the evaluation metrics being used, ideally with a description of why. -->
[More Information Needed]
### Results
[More Information Needed]
#### Summary
## Model Examination [optional]
<!-- Relevant interpretability work for the model goes here -->
[More Information Needed]
## Environmental Impact
<!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700).
- **Hardware Type:** [More Information Needed]
- **Hours used:** [More Information Needed]
- **Cloud Provider:** [More Information Needed]
- **Compute Region:** [More Information Needed]
- **Carbon Emitted:** [More Information Needed]
## Technical Specifications [optional]
### Model Architecture and Objective
[More Information Needed]
### Compute Infrastructure
[More Information Needed]
#### Hardware
[More Information Needed]
#### Software
[More Information Needed]
## Citation [optional]
<!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
**BibTeX:**
[More Information Needed]
**APA:**
[More Information Needed]
## Glossary [optional]
<!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
[More Information Needed]
## More Information [optional]
[More Information Needed]
## Model Card Authors [optional]
[More Information Needed]
## Model Card Contact
[More Information Needed]

52
chat_template.jinja Normal file
View File

@@ -0,0 +1,52 @@
{%- if tools %}
{{- '<|im_start|>system\n' }}
{%- if messages[0]['role'] == 'system' %}
{{- messages[0]['content'] }}
{%- else %}
{{- 'You are Qwen, created by Alibaba Cloud. You are a helpful assistant.' }}
{%- endif %}
{{- "\n\n# Tools\n\nYou may call one or more functions to assist with the user query.\n\nYou are provided with function signatures within <tools></tools> XML tags:\n<tools>" }}
{%- 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.role == "user") or (message.role == "system" and not loop.first) or (message.role == "assistant" and not message.tool_calls) %}
{{- '<|im_start|>' + message.role + '\n' + message.content + '<|im_end|>' + '\n' }}
{%- elif message.role == "assistant" %}
{{- '<|im_start|>' + message.role }}
{%- if message.content %}
{{- '\n' + message.content }}
{%- endif %}
{%- for tool_call in message.tool_calls %}
{%- if tool_call.function is defined %}
{%- set tool_call = tool_call.function %}
{%- endif %}
{{- '\n<tool_call>\n{"name": "' }}
{{- tool_call.name }}
{{- '", "arguments": ' }}
{{- tool_call.arguments | tojson }}
{{- '}\n</tool_call>' }}
{%- endfor %}
{{- '<|im_end|>\n' }}
{%- elif message.role == "tool" %}
{%- if (loop.index0 == 0) or (messages[loop.index0 - 1].role != "tool") %}
{{- '<|im_start|>user' }}
{%- endif %}
{{- '\n<tool_response>\n' }}
{{- message.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 %}

45
config.json Normal file
View File

@@ -0,0 +1,45 @@
{
"architectures": [
"Qwen3ForCausalLM"
],
"attention_bias": false,
"attention_dropout": 0.0,
"bos_token_id": null,
"dtype": "float16",
"eos_token_id": 146215,
"head_dim": 128,
"hidden_act": "silu",
"hidden_size": 2560,
"initializer_range": 0.02,
"intermediate_size": 9728,
"layer_types": [
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention",
"full_attention"
],
"max_position_embeddings": 262144,
"max_window_layers": 36,
"model_type": "qwen3",
"num_attention_heads": 32,
"num_hidden_layers": 10,
"num_key_value_heads": 8,
"pad_token_id": 146213,
"rms_norm_eps": 1e-06,
"rope_parameters": {
"rope_theta": 5000000,
"rope_type": "default"
},
"sliding_window": null,
"tie_word_embeddings": true,
"transformers_version": "5.10.2",
"use_cache": true,
"use_sliding_window": false,
"vocab_size": 146260
}

9
generation_config.json Normal file
View File

@@ -0,0 +1,9 @@
{
"do_sample": true,
"eos_token_id": 146215,
"pad_token_id": 146213,
"temperature": 0.7,
"top_k": 20,
"top_p": 0.8,
"transformers_version": "5.10.2"
}

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:40bb3df01408dfdf0f6801b6db716c8bac5eaa2086b13cf81dabbbdf81341c56
size 950719424

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:6eece4a8bc508a03fad884fadd88ca9e49ffecc999b53f245106fc98003c7eae
size 983094472

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:600195d1d06f15ba5c28db5fa714653bb60f35027d44f419e543bee9123c5b78
size 833671304

View File

@@ -0,0 +1,120 @@
{
"metadata": {
"total_parameters": 1383736320,
"total_size": 2767472640
},
"weight_map": {
"model.embed_tokens.weight": "model-00001-of-00003.safetensors",
"model.layers.0.input_layernorm.weight": "model-00001-of-00003.safetensors",
"model.layers.0.mlp.down_proj.weight": "model-00001-of-00003.safetensors",
"model.layers.0.mlp.gate_proj.weight": "model-00001-of-00003.safetensors",
"model.layers.0.mlp.up_proj.weight": "model-00001-of-00003.safetensors",
"model.layers.0.post_attention_layernorm.weight": "model-00001-of-00003.safetensors",
"model.layers.0.self_attn.k_norm.weight": "model-00001-of-00003.safetensors",
"model.layers.0.self_attn.k_proj.weight": "model-00001-of-00003.safetensors",
"model.layers.0.self_attn.o_proj.weight": "model-00001-of-00003.safetensors",
"model.layers.0.self_attn.q_norm.weight": "model-00001-of-00003.safetensors",
"model.layers.0.self_attn.q_proj.weight": "model-00001-of-00003.safetensors",
"model.layers.0.self_attn.v_proj.weight": "model-00001-of-00003.safetensors",
"model.layers.1.input_layernorm.weight": "model-00001-of-00003.safetensors",
"model.layers.1.mlp.down_proj.weight": "model-00002-of-00003.safetensors",
"model.layers.1.mlp.gate_proj.weight": "model-00002-of-00003.safetensors",
"model.layers.1.mlp.up_proj.weight": "model-00002-of-00003.safetensors",
"model.layers.1.post_attention_layernorm.weight": "model-00002-of-00003.safetensors",
"model.layers.1.self_attn.k_norm.weight": "model-00002-of-00003.safetensors",
"model.layers.1.self_attn.k_proj.weight": "model-00002-of-00003.safetensors",
"model.layers.1.self_attn.o_proj.weight": "model-00002-of-00003.safetensors",
"model.layers.1.self_attn.q_norm.weight": "model-00002-of-00003.safetensors",
"model.layers.1.self_attn.q_proj.weight": "model-00002-of-00003.safetensors",
"model.layers.1.self_attn.v_proj.weight": "model-00002-of-00003.safetensors",
"model.layers.2.input_layernorm.weight": "model-00002-of-00003.safetensors",
"model.layers.2.mlp.down_proj.weight": "model-00002-of-00003.safetensors",
"model.layers.2.mlp.gate_proj.weight": "model-00002-of-00003.safetensors",
"model.layers.2.mlp.up_proj.weight": "model-00002-of-00003.safetensors",
"model.layers.2.post_attention_layernorm.weight": "model-00002-of-00003.safetensors",
"model.layers.2.self_attn.k_norm.weight": "model-00002-of-00003.safetensors",
"model.layers.2.self_attn.k_proj.weight": "model-00002-of-00003.safetensors",
"model.layers.2.self_attn.o_proj.weight": "model-00002-of-00003.safetensors",
"model.layers.2.self_attn.q_norm.weight": "model-00002-of-00003.safetensors",
"model.layers.2.self_attn.q_proj.weight": "model-00002-of-00003.safetensors",
"model.layers.2.self_attn.v_proj.weight": "model-00002-of-00003.safetensors",
"model.layers.3.input_layernorm.weight": "model-00002-of-00003.safetensors",
"model.layers.3.mlp.down_proj.weight": "model-00002-of-00003.safetensors",
"model.layers.3.mlp.gate_proj.weight": "model-00002-of-00003.safetensors",
"model.layers.3.mlp.up_proj.weight": "model-00002-of-00003.safetensors",
"model.layers.3.post_attention_layernorm.weight": "model-00002-of-00003.safetensors",
"model.layers.3.self_attn.k_norm.weight": "model-00002-of-00003.safetensors",
"model.layers.3.self_attn.k_proj.weight": "model-00002-of-00003.safetensors",
"model.layers.3.self_attn.o_proj.weight": "model-00002-of-00003.safetensors",
"model.layers.3.self_attn.q_norm.weight": "model-00002-of-00003.safetensors",
"model.layers.3.self_attn.q_proj.weight": "model-00002-of-00003.safetensors",
"model.layers.3.self_attn.v_proj.weight": "model-00002-of-00003.safetensors",
"model.layers.4.input_layernorm.weight": "model-00002-of-00003.safetensors",
"model.layers.4.mlp.down_proj.weight": "model-00002-of-00003.safetensors",
"model.layers.4.mlp.gate_proj.weight": "model-00002-of-00003.safetensors",
"model.layers.4.mlp.up_proj.weight": "model-00002-of-00003.safetensors",
"model.layers.4.post_attention_layernorm.weight": "model-00002-of-00003.safetensors",
"model.layers.4.self_attn.k_norm.weight": "model-00002-of-00003.safetensors",
"model.layers.4.self_attn.k_proj.weight": "model-00002-of-00003.safetensors",
"model.layers.4.self_attn.o_proj.weight": "model-00002-of-00003.safetensors",
"model.layers.4.self_attn.q_norm.weight": "model-00002-of-00003.safetensors",
"model.layers.4.self_attn.q_proj.weight": "model-00002-of-00003.safetensors",
"model.layers.4.self_attn.v_proj.weight": "model-00002-of-00003.safetensors",
"model.layers.5.input_layernorm.weight": "model-00002-of-00003.safetensors",
"model.layers.5.mlp.down_proj.weight": "model-00002-of-00003.safetensors",
"model.layers.5.mlp.gate_proj.weight": "model-00002-of-00003.safetensors",
"model.layers.5.mlp.up_proj.weight": "model-00002-of-00003.safetensors",
"model.layers.5.post_attention_layernorm.weight": "model-00002-of-00003.safetensors",
"model.layers.5.self_attn.k_norm.weight": "model-00002-of-00003.safetensors",
"model.layers.5.self_attn.k_proj.weight": "model-00002-of-00003.safetensors",
"model.layers.5.self_attn.o_proj.weight": "model-00002-of-00003.safetensors",
"model.layers.5.self_attn.q_norm.weight": "model-00002-of-00003.safetensors",
"model.layers.5.self_attn.q_proj.weight": "model-00003-of-00003.safetensors",
"model.layers.5.self_attn.v_proj.weight": "model-00003-of-00003.safetensors",
"model.layers.6.input_layernorm.weight": "model-00003-of-00003.safetensors",
"model.layers.6.mlp.down_proj.weight": "model-00003-of-00003.safetensors",
"model.layers.6.mlp.gate_proj.weight": "model-00003-of-00003.safetensors",
"model.layers.6.mlp.up_proj.weight": "model-00003-of-00003.safetensors",
"model.layers.6.post_attention_layernorm.weight": "model-00003-of-00003.safetensors",
"model.layers.6.self_attn.k_norm.weight": "model-00003-of-00003.safetensors",
"model.layers.6.self_attn.k_proj.weight": "model-00003-of-00003.safetensors",
"model.layers.6.self_attn.o_proj.weight": "model-00003-of-00003.safetensors",
"model.layers.6.self_attn.q_norm.weight": "model-00003-of-00003.safetensors",
"model.layers.6.self_attn.q_proj.weight": "model-00003-of-00003.safetensors",
"model.layers.6.self_attn.v_proj.weight": "model-00003-of-00003.safetensors",
"model.layers.7.input_layernorm.weight": "model-00003-of-00003.safetensors",
"model.layers.7.mlp.down_proj.weight": "model-00003-of-00003.safetensors",
"model.layers.7.mlp.gate_proj.weight": "model-00003-of-00003.safetensors",
"model.layers.7.mlp.up_proj.weight": "model-00003-of-00003.safetensors",
"model.layers.7.post_attention_layernorm.weight": "model-00003-of-00003.safetensors",
"model.layers.7.self_attn.k_norm.weight": "model-00003-of-00003.safetensors",
"model.layers.7.self_attn.k_proj.weight": "model-00003-of-00003.safetensors",
"model.layers.7.self_attn.o_proj.weight": "model-00003-of-00003.safetensors",
"model.layers.7.self_attn.q_norm.weight": "model-00003-of-00003.safetensors",
"model.layers.7.self_attn.q_proj.weight": "model-00003-of-00003.safetensors",
"model.layers.7.self_attn.v_proj.weight": "model-00003-of-00003.safetensors",
"model.layers.8.input_layernorm.weight": "model-00003-of-00003.safetensors",
"model.layers.8.mlp.down_proj.weight": "model-00003-of-00003.safetensors",
"model.layers.8.mlp.gate_proj.weight": "model-00003-of-00003.safetensors",
"model.layers.8.mlp.up_proj.weight": "model-00003-of-00003.safetensors",
"model.layers.8.post_attention_layernorm.weight": "model-00003-of-00003.safetensors",
"model.layers.8.self_attn.k_norm.weight": "model-00003-of-00003.safetensors",
"model.layers.8.self_attn.k_proj.weight": "model-00003-of-00003.safetensors",
"model.layers.8.self_attn.o_proj.weight": "model-00003-of-00003.safetensors",
"model.layers.8.self_attn.q_norm.weight": "model-00003-of-00003.safetensors",
"model.layers.8.self_attn.q_proj.weight": "model-00003-of-00003.safetensors",
"model.layers.8.self_attn.v_proj.weight": "model-00003-of-00003.safetensors",
"model.layers.9.input_layernorm.weight": "model-00003-of-00003.safetensors",
"model.layers.9.mlp.down_proj.weight": "model-00003-of-00003.safetensors",
"model.layers.9.mlp.gate_proj.weight": "model-00003-of-00003.safetensors",
"model.layers.9.mlp.up_proj.weight": "model-00003-of-00003.safetensors",
"model.layers.9.post_attention_layernorm.weight": "model-00003-of-00003.safetensors",
"model.layers.9.self_attn.k_norm.weight": "model-00003-of-00003.safetensors",
"model.layers.9.self_attn.k_proj.weight": "model-00003-of-00003.safetensors",
"model.layers.9.self_attn.o_proj.weight": "model-00003-of-00003.safetensors",
"model.layers.9.self_attn.q_norm.weight": "model-00003-of-00003.safetensors",
"model.layers.9.self_attn.q_proj.weight": "model-00003-of-00003.safetensors",
"model.layers.9.self_attn.v_proj.weight": "model-00003-of-00003.safetensors",
"model.norm.weight": "model-00003-of-00003.safetensors"
}
}

3
tokenizer.json Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:5408c0e76d30d5f9348593818dcaafdd45dbe64ba19fcd5fb92c2677c15f4cf1
size 12380040

15
tokenizer_config.json Normal file
View File

@@ -0,0 +1,15 @@
{
"add_prefix_space": false,
"backend": "tokenizers",
"bos_token": "<|endoftext|>",
"clean_up_tokenization_spaces": false,
"eos_token": "<|im_end|>",
"errors": "replace",
"is_local": false,
"local_files_only": false,
"model_max_length": 131072,
"pad_token": "<|endoftext|>",
"split_special_tokens": false,
"tokenizer_class": "Qwen2Tokenizer",
"unk_token": null
}