arnomatic commited on
Commit
a5e6896
·
verified ·
1 Parent(s): f177fc5

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +197 -199
README.md CHANGED
@@ -1,199 +1,197 @@
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
+ pipeline_tag: text-generation
3
+ library_name: transformers
4
+ tags:
5
+ - mining
6
+ - heretic
7
+ - uncensored
8
+ - decensored
9
+ - abliterated
10
+ license: apache-2.0
11
+ language:
12
+ - ru
13
+ base_model: t-tech/T-pro-it-2.0
14
+ ---
15
+ # This is a decensored version of [nn-tech/MetalGPT-1](https://huggingface.co/nn-tech/MetalGPT-1), made using [Heretic](https://github.com/p-e-w/heretic) v1.1.0
16
+
17
+ ## Abliteration parameters
18
+
19
+ | Parameter | Value |
20
+ | :-------- | :---: |
21
+ | **direction_index** | 46.46 |
22
+ | **attn.o_proj.max_weight** | 1.40 |
23
+ | **attn.o_proj.max_weight_position** | 46.32 |
24
+ | **attn.o_proj.min_weight** | 1.06 |
25
+ | **attn.o_proj.min_weight_distance** | 36.21 |
26
+ | **mlp.down_proj.max_weight** | 1.43 |
27
+ | **mlp.down_proj.max_weight_position** | 45.02 |
28
+ | **mlp.down_proj.min_weight** | 0.71 |
29
+ | **mlp.down_proj.min_weight_distance** | 34.08 |
30
+
31
+ ## Performance
32
+
33
+ | Metric | This model | Original model ([nn-tech/MetalGPT-1](https://huggingface.co/nn-tech/MetalGPT-1)) |
34
+ | :----- | :--------: | :---------------------------: |
35
+ | **KL divergence** | 0.0013 | 0 *(by definition)* |
36
+ | **Refusals** | 14/100 | 100/100 |
37
+
38
+ -----
39
+
40
+
41
+ ## Description
42
+
43
+ **MetalGPT-1** is a model built upon the Qwen/Qwen3-32B and incorporates both continual pre-training and supervised fine-tuning on domain-specific data from the mining and metallurgy industry.
44
+
45
+ ---
46
+
47
+ ### HF Usage (Transformers)
48
+
49
+ ```python
50
+ from transformers import AutoTokenizer, AutoModelForCausalLM
51
+ import torch
52
+
53
+ torch.manual_seed(42)
54
+
55
+ model_name = "nn-tech/MetalGPT-1"
56
+
57
+ tokenizer = AutoTokenizer.from_pretrained(model_name)
58
+ model = AutoModelForCausalLM.from_pretrained(
59
+ model_name,
60
+ torch_dtype="bfloat16",
61
+ device_map="auto",
62
+ )
63
+
64
+ prompt = (
65
+ "Назови плюсы и минусы хлоридной и сульфатной технологии производства никеля."
66
+ )
67
+
68
+ messages = [
69
+ {"role": "system", "content": "Ты специалист в области металлургии."},
70
+ {"role": "user", "content": prompt},
71
+ ]
72
+
73
+ text = tokenizer.apply_chat_template(
74
+ messages,
75
+ tokenize=False,
76
+ add_generation_prompt=True,
77
+ # enable_thinking=False
78
+ )
79
+
80
+ model_inputs = tokenizer([text], return_tensors="pt").to(model.device)
81
+
82
+ generated_ids = model.generate(
83
+ **model_inputs,
84
+ max_new_tokens=2048,
85
+ )
86
+
87
+ # Обрезаем префикс промпта
88
+ generated_ids = [
89
+ output_ids[len(input_ids):]
90
+ for input_ids, output_ids in zip(model_inputs.input_ids, generated_ids)
91
+ ]
92
+
93
+ response = tokenizer.batch_decode(
94
+ generated_ids,
95
+ skip_special_tokens=True
96
+ )[0]
97
+
98
+ print(response)
99
+ ```
100
+
101
+ ### Output
102
+
103
+ ```text
104
+ <think>
105
+ Хорошо, мне нужно разобраться в плюсах и минусах хлоридной и сульфатной технологий производства никеля. Начну с того, что вспомню, что эти технологии относятся к гидрометаллургическим процессам, то есть используют водные растворы для извлечения металлов.
106
+
107
+ Сначала подумаю о хлоридной технологии. Возможно, она связана с использованием соляной кислоты или хлорида натрия. Преимущества могут быть в более высокой растворимости некоторых соединений, что позволяет эффективно извлекать никель. Также, возможно, процесс работает при более низких температурах, что экономит энергию. Но есть и недостатки: коррозионная активность хлора может быть проблемой, оборудование должно быть из специальных материалов, что увеличивает стоимость. Также выбросы хлора в атмосферу опасны, требуют сложных систем очистки.
108
+
109
+ Теперь сульфатная технология. Здесь, наверное, используется серная кислота. Плюсы: серная кислота дешевле и доступнее, чем соляная. Процесс может быть более стабильным, меньше коррозии по сравнению с хлоридом. Минусы: возможно, более низкая скорость реакции, необходимость в более высоких температурах, что увеличивает энергозатраты. Также образование сульфатов, которые могут быть менее селективными, что приводит к большему количеству побочных продуктов.
110
+
111
+ Нужно проверить, не путаю ли я процессы. Например, в хлоридной технологии может использоваться хлорирование для перевода никеля в раствор, тогда как в сульфатной — кислотное выщелачивание. Также важно учесть, что хлоридные процессы могут быть более эффективны для определенных типов руд, например, с высоким содержанием железа, так как хлориды железа легко растворяются. В то время как сульфатные процессы могут быть предпочтительнее для руд с низким содержанием железа, чтобы избежать загрязнения раствора.
112
+
113
+ Еще момент: в хлоридной технологии возможно использование электролиза для получения чистого никеля, тогда как в сульфатной — тоже, но с другими условиями. Также стоит упомянуть экологические аспекты: хлоридные процессы могут быть более токсичными, требуют строгого контроля выбросов, тогда как сульфатные — меньше проблем с выбросами, но больше с отходами кислоты.
114
+
115
+ Нужно структурировать ответ, разделив на плюсы и минусы для каждой технологии, возможно, в виде списков. Убедиться, что информация точная и не противоречит друг другу. Проверить, нет ли ошибок в понимании процессов. Например, в хлоридной технологии может быть этап хлорирования, который требует высоких температур, что увеличивает энергозатраты, но позволяет извлекать никель из сложных руд. В сульфатной — возможно, более простой процесс, но менее эффективный для определенных типов сырья.
116
+
117
+ Также стоит отметить, что выбор технологии зависит от типа руды, наличия инфраструктуры, экологических норм и экономических факторов. Возможно, в некоторых регионах предпочтительнее одна технология, в других — другая. Важно подчеркнуть, что обе технологии имеют свои ниши и применяются в зависимости от конкретных условий.
118
+ </think>
119
+
120
+ Плюсы и минусы хлоридной и сульфатной технологий производства никеля
121
+
122
+ Хлоридная технология
123
+ Плюсы:
124
+ 1. Высокая селективность и эффективность извлечения — хлориды никеля хорошо растворяются в воде, что позволяет эффективно извлекать металл из сложных руд, включая сульфидные и оксидные.
125
+ 2. Возможность работы при низких температурах — некоторые этапы (например, выщелачивание) могут проводиться при умеренных температурах, снижая энергозатраты.
126
+ 3. Подходит для руд с высоким содержанием железа — хлориды железа легко растворяются, что упрощает разделение никеля от примесей.
127
+ 4. Возможность получения чистого никеля — электролиз в хлоридных растворах позволяет получать высокочистый никель.
128
+
129
+ Минусы:
130
+ 1. Коррозионная активность — хлоридные растворы агрессивны, требуют использования дорогостоящих материалов (например, титан, нержавеющая сталь).
131
+ 2. Экологические риски — выбросы хлора и его соединений то��сичны, требуют сложных систем очистки и контроля.
132
+ 3. Высокая стоимость реагентов — соляная кислота и хлорид натрия дороже, чем серная кислота.
133
+ 4. Ограниченная применимость — менее эффективна для руд с низким содержанием никеля или высоким содержанием кремнезема.
134
+
135
+ Сульфатная технология
136
+ Плюсы:
137
+ 1. Дешевизна реагентов серная кислота один из самых доступных и дешёвых реагентов.
138
+ 2. Меньшая коррозионная активность — сульфатные растворы менее агрессивны, чем хлоридные, что снижает износ оборудования.
139
+ 3. Экологическая безопасность — выбросы сульфатов менее токсичны, проще поддаются контролю.
140
+ 4. Широкая применимость — эффективна для большинства типов руд, особенно оксидных и низкосульфидных.
141
+
142
+ Минусы:
143
+ 1. Низкая селективность сульфаты железа и других примесей могут мешать извлечению никеля, требуя дополнительных стадий очистки.
144
+ 2. Высокие энергозатраты — некоторые процессы (например, выщелачивание) требуют нагревания, что увеличивает расход энергии.
145
+ 3. Сложность регенерации кислоты серная кислота может разлагаться, требуя её частой замены.
146
+ 4. Ограниченная эффективность для сложных руд — менее эффективна для руд с высоким содержанием железа или кремнезема.
147
+
148
+ Итог:
149
+ - Хлоридная технология предпочтительна для сложных руд с высоким содержанием никеля и железа, но требует строгого контроля коррозии и выбросов.
150
+ - Сульфатная технология более экономична и экологична, но менее эффективна для сложных руд. Выбор зависит от типа сырья, инфраструктуры и экологических норм.
151
+ ```
152
+
153
+ ---
154
+
155
+ ### vLLM Usage
156
+
157
+ ```python
158
+ from transformers import AutoTokenizer
159
+ from vllm import LLM, SamplingParams
160
+
161
+ model_name = "nn-tech/MetalGPT-1"
162
+
163
+ tokenizer = AutoTokenizer.from_pretrained(model_name)
164
+ llm = LLM(model=model_name, max_model_len=8192)
165
+
166
+ sampling_params = SamplingParams(
167
+ temperature=0.7,
168
+ repetition_penalty=1.05,
169
+ top_p=0.8,
170
+ top_k=70,
171
+ max_tokens=2048,
172
+ )
173
+
174
+ prompt = (
175
+ "Назови плюсы и минусы хлоридной и сульфатной технологии производства никеля."
176
+ )
177
+
178
+ messages = [
179
+ {"role": "system", "content": "Ты специалист в области металлургии."},
180
+ {"role": "user", "content": prompt},
181
+ ]
182
+
183
+ prompt_token_ids = tokenizer.apply_chat_template(
184
+ messages,
185
+ add_generation_prompt=True,
186
+ )
187
+
188
+ outputs = llm.generate(
189
+ prompt_token_ids=prompt_token_ids,
190
+ sampling_params=sampling_params,
191
+ )
192
+
193
+ generated_text = [output.outputs[0].text for output in outputs]
194
+ print(generated_text[0])
195
+ ```
196
+
197
+