C10X commited on
Commit
4f71cda
·
verified ·
1 Parent(s): d1e9bf5

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +165 -199
README.md CHANGED
@@ -1,199 +1,165 @@
1
- ---
2
- library_name: transformers
3
- tags: []
4
- ---
5
-
6
- # Model Card for Model ID
7
-
8
- <!-- Provide a quick summary of what the model is/does. -->
9
-
10
-
11
-
12
- ## Model Details
13
-
14
- ### Model Description
15
-
16
- <!-- Provide a longer summary of what this model is. -->
17
-
18
- This is the model card of a 🤗 transformers model that has been pushed on the Hub. This model card has been automatically generated.
19
-
20
- - **Developed by:** [More Information Needed]
21
- - **Funded by [optional]:** [More Information Needed]
22
- - **Shared by [optional]:** [More Information Needed]
23
- - **Model type:** [More Information Needed]
24
- - **Language(s) (NLP):** [More Information Needed]
25
- - **License:** [More Information Needed]
26
- - **Finetuned from model [optional]:** [More Information Needed]
27
-
28
- ### Model Sources [optional]
29
-
30
- <!-- Provide the basic links for the model. -->
31
-
32
- - **Repository:** [More Information Needed]
33
- - **Paper [optional]:** [More Information Needed]
34
- - **Demo [optional]:** [More Information Needed]
35
-
36
- ## Uses
37
-
38
- <!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
39
-
40
- ### Direct Use
41
-
42
- <!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
43
-
44
- [More Information Needed]
45
-
46
- ### Downstream Use [optional]
47
-
48
- <!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
49
-
50
- [More Information Needed]
51
-
52
- ### Out-of-Scope Use
53
-
54
- <!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
55
-
56
- [More Information Needed]
57
-
58
- ## Bias, Risks, and Limitations
59
-
60
- <!-- This section is meant to convey both technical and sociotechnical limitations. -->
61
-
62
- [More Information Needed]
63
-
64
- ### Recommendations
65
-
66
- <!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
67
-
68
- Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
69
-
70
- ## How to Get Started with the Model
71
-
72
- Use the code below to get started with the model.
73
-
74
- [More Information Needed]
75
-
76
- ## Training Details
77
-
78
- ### Training Data
79
-
80
- <!-- 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. -->
81
-
82
- [More Information Needed]
83
-
84
- ### Training Procedure
85
-
86
- <!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
87
-
88
- #### Preprocessing [optional]
89
-
90
- [More Information Needed]
91
-
92
-
93
- #### Training Hyperparameters
94
-
95
- - **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
96
-
97
- #### Speeds, Sizes, Times [optional]
98
-
99
- <!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
100
-
101
- [More Information Needed]
102
-
103
- ## Evaluation
104
-
105
- <!-- This section describes the evaluation protocols and provides the results. -->
106
-
107
- ### Testing Data, Factors & Metrics
108
-
109
- #### Testing Data
110
-
111
- <!-- This should link to a Dataset Card if possible. -->
112
-
113
- [More Information Needed]
114
-
115
- #### Factors
116
-
117
- <!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
118
-
119
- [More Information Needed]
120
-
121
- #### Metrics
122
-
123
- <!-- These are the evaluation metrics being used, ideally with a description of why. -->
124
-
125
- [More Information Needed]
126
-
127
- ### Results
128
-
129
- [More Information Needed]
130
-
131
- #### Summary
132
-
133
-
134
-
135
- ## Model Examination [optional]
136
-
137
- <!-- Relevant interpretability work for the model goes here -->
138
-
139
- [More Information Needed]
140
-
141
- ## Environmental Impact
142
-
143
- <!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
144
-
145
- 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).
146
-
147
- - **Hardware Type:** [More Information Needed]
148
- - **Hours used:** [More Information Needed]
149
- - **Cloud Provider:** [More Information Needed]
150
- - **Compute Region:** [More Information Needed]
151
- - **Carbon Emitted:** [More Information Needed]
152
-
153
- ## Technical Specifications [optional]
154
-
155
- ### Model Architecture and Objective
156
-
157
- [More Information Needed]
158
-
159
- ### Compute Infrastructure
160
-
161
- [More Information Needed]
162
-
163
- #### Hardware
164
-
165
- [More Information Needed]
166
-
167
- #### Software
168
-
169
- [More Information Needed]
170
-
171
- ## Citation [optional]
172
-
173
- <!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
174
-
175
- **BibTeX:**
176
-
177
- [More Information Needed]
178
-
179
- **APA:**
180
-
181
- [More Information Needed]
182
-
183
- ## Glossary [optional]
184
-
185
- <!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
186
-
187
- [More Information Needed]
188
-
189
- ## More Information [optional]
190
-
191
- [More Information Needed]
192
-
193
- ## Model Card Authors [optional]
194
-
195
- [More Information Needed]
196
-
197
- ## Model Card Contact
198
-
199
- [More Information Needed]
 
1
+ ---
2
+ license: apache-2.0
3
+ language:
4
+ - en
5
+ - zh
6
+ library_name: transformers
7
+ pipeline_tag: text-generation
8
+ tags:
9
+ - llm
10
+ - nanbeige
11
+ - heretic
12
+ - uncensored
13
+ - decensored
14
+ - abliterated
15
+ base_model:
16
+ - Nanbeige/Nanbeige4-3B-Base
17
+ ---
18
+ # This is a decensored version of [C10X/Nanbeige4-3B-Thinking-2511-Claude-4.5-Opus-High-Reasoning-Distill-V2](https://huggingface.co/C10X/Nanbeige4-3B-Thinking-2511-Claude-4.5-Opus-High-Reasoning-Distill-V2), made using [Heretic](https://github.com/p-e-w/heretic) v1.1.0
19
+
20
+ ## Abliteration parameters
21
+
22
+ | Parameter | Value |
23
+ | :-------- | :---: |
24
+ | **direction_index** | 14.75 |
25
+ | **attn.o_proj.max_weight** | 1.05 |
26
+ | **attn.o_proj.max_weight_position** | 23.95 |
27
+ | **attn.o_proj.min_weight** | 0.73 |
28
+ | **attn.o_proj.min_weight_distance** | 18.44 |
29
+ | **mlp.down_proj.max_weight** | 1.46 |
30
+ | **mlp.down_proj.max_weight_position** | 24.68 |
31
+ | **mlp.down_proj.min_weight** | 1.11 |
32
+ | **mlp.down_proj.min_weight_distance** | 18.33 |
33
+
34
+ ## Performance
35
+
36
+ | Metric | This model | Original model ([C10X/Nanbeige4-3B-Thinking-2511-Claude-4.5-Opus-High-Reasoning-Distill-V2](https://huggingface.co/C10X/Nanbeige4-3B-Thinking-2511-Claude-4.5-Opus-High-Reasoning-Distill-V2)) |
37
+ | :----- | :--------: | :---------------------------: |
38
+ | **KL divergence** | 0.1122 | 0 *(by definition)* |
39
+ | **Refusals** | 7/100 | 94/100 |
40
+
41
+ -----
42
+
43
+ <div align="center">
44
+
45
+ <img src="figures/nbg.png" width="220" alt="Nanbeige Logo">
46
+ </div>
47
+
48
+
49
+ # News
50
+
51
+ 🎉 Nanbeige4-3B-Thinking-2511 debuts at #11 on [**WritingBench**](https://huggingface.co/spaces/WritingBench/WritingBench)! Despite only 3B parameters, its creative-writing ability chops rival those of hundred-billion-parameter giants.
52
+
53
+ 🎉 Nanbeige4-3B-Thinking-2511 ranks #15 on [**EQBench3**](https://eqbench.com/), demonstrating human-preference alignment and emotional intelligence comparable to much larger models.
54
+
55
+ # Introduction
56
+ Nanbeige4-3B-Thinking-2511 is an enhanced iteration over our previous Nanbeige4-3B-Thinking-2510.
57
+ Through advanced knowledge distillation techniques and targeted reinforcement learning (RL) optimization, we have significantly scaled the model’s reasoning capabilities, delivering stronger and more reliable performance on diverse challenging benchmarks.
58
+ This version establishes new state-of-the-art (SOTA) results among open models under 32B parameters on AIME, GPQA-Diamond, Arena-Hard-V2, and BFCL-V4, which marks a major milestone in delivering powerful yet efficient reasoning capabilities at a compact scale.
59
+
60
+ * Technical Report: https://arxiv.org/pdf/2512.06266
61
+
62
+ <div align="center">
63
+
64
+ <img src="figures/nbg_performance.png">
65
+ </div>
66
+
67
+
68
+
69
+
70
+
71
+ ## <span id="Inference">Quickstart</span>
72
+
73
+ For inference hyperparameters, we recommend the following settings:
74
+ * Temperature: 0.6
75
+ * Top-p: 0.95
76
+ * Repeat penalty: 1.0
77
+
78
+ For the chat scenario:
79
+ ```
80
+ from transformers import AutoModelForCausalLM, AutoTokenizer
81
+ tokenizer = AutoTokenizer.from_pretrained(
82
+ 'Nanbeige/Nanbeige4-3B-Thinking-2511',
83
+ use_fast=False,
84
+ trust_remote_code=True
85
+ )
86
+ model = AutoModelForCausalLM.from_pretrained(
87
+ 'Nanbeige/Nanbeige4-3B-Thinking-2511',
88
+ torch_dtype='auto',
89
+ device_map='auto',
90
+ trust_remote_code=True
91
+ )
92
+ messages = [
93
+ {'role': 'user', 'content': 'Which number is bigger, 9.11 or 9.8?'}
94
+ ]
95
+ prompt = tokenizer.apply_chat_template(
96
+ messages,
97
+ add_generation_prompt=True,
98
+ tokenize=False
99
+ )
100
+ input_ids = tokenizer(prompt, add_special_tokens=False, return_tensors='pt').input_ids
101
+ output_ids = model.generate(input_ids.to('cuda'), eos_token_id=166101)
102
+ resp = tokenizer.decode(output_ids[0][len(input_ids[0]):], skip_special_tokens=True)
103
+ print(resp)
104
+ ```
105
+
106
+ For the tool use scenario:
107
+ ```
108
+ from transformers import AutoModelForCausalLM, AutoTokenizer
109
+ tokenizer = AutoTokenizer.from_pretrained(
110
+ 'Nanbeige/Nanbeige4-3B-Thinking-2511',
111
+ use_fast=False,
112
+ trust_remote_code=True
113
+ )
114
+ model = AutoModelForCausalLM.from_pretrained(
115
+ 'Nanbeige/Nanbeige4-3B-Thinking-2511',
116
+ torch_dtype='auto',
117
+ device_map='auto',
118
+ trust_remote_code=True
119
+ )
120
+ messages = [
121
+ {'role': 'user', 'content': 'Help me check the weather in Beijing now'}
122
+ ]
123
+ tools = [{'type': 'function',
124
+ 'function': {'name': 'SearchWeather',
125
+ 'description': 'Find out current weather in a certain place on a certain day.',
126
+ 'parameters': {'type': 'dict',
127
+ 'properties': {'location': {'type': 'string',
128
+ 'description': 'A city in china.'},
129
+ 'required': ['location']}}}}]
130
+ prompt = tokenizer.apply_chat_template(
131
+ messages,
132
+ tools,
133
+ add_generation_prompt=True,
134
+ tokenize=False
135
+ )
136
+ input_ids = tokenizer(prompt, add_special_tokens=False, return_tensors='pt').input_ids
137
+ output_ids = model.generate(input_ids.to('cuda'), eos_token_id=166101)
138
+ resp = tokenizer.decode(output_ids[0][len(input_ids[0]):], skip_special_tokens=True)
139
+ print(resp)
140
+ ```
141
+
142
+
143
+ # <span id="Limitations">Limitations</span>
144
+
145
+ While we place great emphasis on the safety of the model during the training process, striving to ensure that its outputs align with ethical and legal requirements, it may not completely avoid generating unexpected outputs due to the model's size and probabilistic nature. These outputs may include harmful content such as bias or discrimination. Please don't propagate such content. We do not assume any responsibility for the consequences resulting from the dissemination of inappropriate information.
146
+ <br>
147
+
148
+ # <span id="Limitations">Citation</span>
149
+ If you find our model useful or want to use it in your projects, please cite as follows:
150
+ ```
151
+ @misc{yang2025nanbeige43btechnicalreportexploring,
152
+ title={Nanbeige4-3B Technical Report: Exploring the Frontier of Small Language Models},
153
+ author={Chen Yang and Guangyue Peng and Jiaying Zhu and Ran Le and Ruixiang Feng and Tao Zhang and Wei Ruan and Xiaoqi Liu and Xiaoxue Cheng and Xiyun Xu and Yang Song and Yanzipeng Gao and Yiming Jia and Yun Xing and Yuntao Wen and Zekai Wang and Zhenwei An and Zhicong Sun and Zongchao Chen},
154
+ year={2025},
155
+ eprint={2512.06266},
156
+ archivePrefix={arXiv},
157
+ primaryClass={cs.CL},
158
+ url={https://arxiv.org/abs/2512.06266},
159
+ }
160
+ ```
161
+ <br>
162
+
163
+ # <span id="Limitations">Contact</span>
164
+ If you have any questions, please raise an issue or contact us at nanbeige@126.com.
165
+ <br>