Polydim-Einsof commited on
Commit
8a95a00
·
verified ·
1 Parent(s): b86fc1b

Upload folder using huggingface_hub

Browse files
.gitattributes CHANGED
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ tokenizer.json filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ library_name: peft
3
+ base_model: deepseek-ai/DeepSeek-R1-Distill-Qwen-14B
4
+ tags:
5
+ - unsloth
6
+ - lora
7
+ - einsof
8
+ - polydim
9
+ - stiefel-manifold
10
+ - formal-theorems
11
+ - pmtp
12
+ license: apache-2.0
13
+ ---
14
+
15
+ # DeepSeek-R1-Distill-Qwen-14B-Einsof-LoRA (v020)
16
+
17
+ **Autor:** Ariel García Traba (Independent Research / EinsofOS)
18
+ **Institución:** Einsof Research / Antigravity Autonomous Compute
19
+ **Entrenado en:** Google Colab Plus (NVIDIA A100-SXM4-40GB)
20
+ **Modelo Base:** `deepseek-ai/DeepSeek-R1-Distill-Qwen-14B`
21
+ **Corpus Canónico:** 1.736 teoremas formales de PostgreSQL 16 (`polydim_vec_db`) + 13 Leyes de Silicio de Einsof.
22
+
23
+ ## Hiperparámetros de Entrenamiento
24
+ - **LoRA Rank (r):** 16
25
+ - **LoRA Alpha (α):** 16
26
+ - **Target Modules:** `q_proj`, `k_proj`, `v_proj`, `o_proj`, `gate_proj`, `up_proj`, `down_proj`
27
+ - **Parámetros Entrenables:** 68,812,800
28
+ - **Precisión Nativa:** BF16 nativo (A100 SXM4)
29
+ - **Optimizador:** `adamw_8bit`
30
+ - **Pérdida Final de Entrenamiento:** 0.7225
31
+
32
+ ## Uso con Unsloth / Hugging Face Transformers
33
+ ```python
34
+ from unsloth import FastLanguageModel
35
+ import torch
36
+
37
+ model, tokenizer = FastLanguageModel.from_pretrained(
38
+ model_name="polydim-einsof/DeepSeek-R1-Distill-Qwen-14B-Einsof-LoRA",
39
+ max_seq_length=4096,
40
+ dtype=torch.bfloat16,
41
+ load_in_4bit=True,
42
+ )
43
+ FastLanguageModel.for_inference(model)
44
+ ```
adapter_config.json ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "alora_invocation_tokens": null,
3
+ "alpha_pattern": {},
4
+ "arrow_config": null,
5
+ "auto_mapping": {
6
+ "base_model_class": "Qwen2ForCausalLM",
7
+ "parent_library": "transformers.models.qwen2.modeling_qwen2",
8
+ "unsloth_fixed": true
9
+ },
10
+ "base_model_name_or_path": "unsloth/DeepSeek-R1-Distill-Qwen-14B-bnb-4bit",
11
+ "bias": "none",
12
+ "corda_config": null,
13
+ "ensure_weight_tying": false,
14
+ "eva_config": null,
15
+ "exclude_modules": null,
16
+ "fan_in_fan_out": false,
17
+ "inference_mode": true,
18
+ "init_lora_weights": true,
19
+ "kasa_config": null,
20
+ "layer_replication": null,
21
+ "layers_pattern": null,
22
+ "layers_to_transform": null,
23
+ "loftq_config": {},
24
+ "lora_alpha": 16,
25
+ "lora_bias": false,
26
+ "lora_dropout": 0,
27
+ "lora_ga_config": null,
28
+ "megatron_config": null,
29
+ "megatron_core": "megatron.core",
30
+ "modules_to_save": null,
31
+ "monteclora_config": null,
32
+ "peft_type": "LORA",
33
+ "peft_version": "0.21.2",
34
+ "qalora_group_size": 16,
35
+ "r": 16,
36
+ "rank_pattern": {},
37
+ "revision": null,
38
+ "target_modules": [
39
+ "o_proj",
40
+ "v_proj",
41
+ "gate_proj",
42
+ "q_proj",
43
+ "down_proj",
44
+ "k_proj",
45
+ "up_proj"
46
+ ],
47
+ "target_parameters": null,
48
+ "task_type": "CAUSAL_LM",
49
+ "trainable_token_indices": null,
50
+ "use_bdlora": null,
51
+ "use_dora": false,
52
+ "use_qalora": false,
53
+ "use_rslora": false,
54
+ "velora_config": null
55
+ }
adapter_model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1bbf29df3a554dad41b65f07900b04cbf4c4ecdd16285f30f80fd841cf237a21
3
+ size 275341720
chat_template.jinja ADDED
@@ -0,0 +1 @@
 
 
1
+ {% if not add_generation_prompt is defined %}{% set add_generation_prompt = false %}{% endif %}{% set ns = namespace(is_first=false, is_tool=false, is_output_first=true, system_prompt='') %}{%- for message in messages %}{%- if message['role'] == 'system' %}{% set ns.system_prompt = message['content'] %}{%- endif %}{%- endfor %}{{bos_token}}{{ns.system_prompt}}{%- for message in messages %}{%- if message['role'] == 'user' %}{%- set ns.is_tool = false -%}{{'<|User|>' + message['content']}}{%- endif %}{%- if message['role'] == 'assistant' and message['content'] is none %}{%- set ns.is_tool = false -%}{%- for tool in message['tool_calls']%}{%- if not ns.is_first %}{{'<|Assistant|><|tool▁calls▁begin|><|tool▁call▁begin|>' + tool['type'] + '<|tool▁sep|>' + tool['function']['name'] + '\n' + '```json' + '\n' + tool['function']['arguments'] + '\n' + '```' + '<|tool▁call▁end|>'}}{%- set ns.is_first = true -%}{%- else %}{{'\n' + '<|tool▁call▁begin|>' + tool['type'] + '<|tool▁sep|>' + tool['function']['name'] + '\n' + '```json' + '\n' + tool['function']['arguments'] + '\n' + '```' + '<|tool▁call▁end|>'}}{{'<|tool▁calls▁end|><|end▁of▁sentence|>'}}{%- endif %}{%- endfor %}{%- endif %}{%- if message['role'] == 'assistant' and message['content'] is not none %}{%- if ns.is_tool %}{{'<|tool▁outputs▁end|>' + message['content'] + '<|end▁of▁sentence|>'}}{%- set ns.is_tool = false -%}{%- else %}{% set content = message['content'] %}{% if '</think>' in content %}{% set content = content.split('</think>')[-1] %}{% endif %}{{'<|Assistant|>' + content + '<|end▁of▁sentence|>'}}{%- endif %}{%- endif %}{%- if message['role'] == 'tool' %}{%- set ns.is_tool = true -%}{%- if ns.is_output_first %}{{'<|tool▁outputs▁begin|><|tool▁output▁begin|>' + message['content'] + '<|tool▁output▁end|>'}}{%- set ns.is_output_first = false %}{%- else %}{{'\n<|tool▁output▁begin|>' + message['content'] + '<|tool▁output▁end|>'}}{%- endif %}{%- endif %}{%- endfor -%}{% if ns.is_tool %}{{'<|tool▁outputs▁end|>'}}{% endif %}{% if add_generation_prompt and not ns.is_tool %}{{'<|Assistant|><think>\n'}}{% endif %}
tokenizer.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7dd428a75dd3f5fee680bc99c4cc951a78a8699f1493b8a4127c0bac2743389b
3
+ size 11422774
tokenizer_config.json ADDED
@@ -0,0 +1,196 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_prefix_space": null,
3
+ "backend": "tokenizers",
4
+ "bos_token": "<|begin▁of▁sentence|>",
5
+ "clean_up_tokenization_spaces": false,
6
+ "eos_token": "<|end▁of▁sentence|>",
7
+ "from_slow": true,
8
+ "is_local": false,
9
+ "legacy": false,
10
+ "local_files_only": false,
11
+ "model_max_length": 131072,
12
+ "pad_token": "<|vision_pad|>",
13
+ "padding_side": "left",
14
+ "sp_model_kwargs": {},
15
+ "tokenizer_class": "Qwen2Tokenizer",
16
+ "unk_token": null,
17
+ "use_default_system_prompt": false,
18
+ "added_tokens_decoder": {
19
+ "151643": {
20
+ "content": "<|end▁of▁sentence|>",
21
+ "single_word": false,
22
+ "lstrip": false,
23
+ "rstrip": false,
24
+ "normalized": false,
25
+ "special": true
26
+ },
27
+ "151644": {
28
+ "content": "<|User|>",
29
+ "single_word": false,
30
+ "lstrip": false,
31
+ "rstrip": false,
32
+ "normalized": false,
33
+ "special": false
34
+ },
35
+ "151645": {
36
+ "content": "<|Assistant|>",
37
+ "single_word": false,
38
+ "lstrip": false,
39
+ "rstrip": false,
40
+ "normalized": false,
41
+ "special": false
42
+ },
43
+ "151646": {
44
+ "content": "<|begin▁of▁sentence|>",
45
+ "single_word": false,
46
+ "lstrip": false,
47
+ "rstrip": false,
48
+ "normalized": false,
49
+ "special": true
50
+ },
51
+ "151647": {
52
+ "content": "<|EOT|>",
53
+ "single_word": false,
54
+ "lstrip": false,
55
+ "rstrip": false,
56
+ "normalized": false,
57
+ "special": false
58
+ },
59
+ "151648": {
60
+ "content": "<think>",
61
+ "single_word": false,
62
+ "lstrip": false,
63
+ "rstrip": false,
64
+ "normalized": false,
65
+ "special": false
66
+ },
67
+ "151649": {
68
+ "content": "</think>",
69
+ "single_word": false,
70
+ "lstrip": false,
71
+ "rstrip": false,
72
+ "normalized": false,
73
+ "special": false
74
+ },
75
+ "151650": {
76
+ "content": "<|quad_start|>",
77
+ "single_word": false,
78
+ "lstrip": false,
79
+ "rstrip": false,
80
+ "normalized": false,
81
+ "special": true
82
+ },
83
+ "151651": {
84
+ "content": "<|quad_end|>",
85
+ "single_word": false,
86
+ "lstrip": false,
87
+ "rstrip": false,
88
+ "normalized": false,
89
+ "special": true
90
+ },
91
+ "151652": {
92
+ "content": "<|vision_start|>",
93
+ "single_word": false,
94
+ "lstrip": false,
95
+ "rstrip": false,
96
+ "normalized": false,
97
+ "special": true
98
+ },
99
+ "151653": {
100
+ "content": "<|vision_end|>",
101
+ "single_word": false,
102
+ "lstrip": false,
103
+ "rstrip": false,
104
+ "normalized": false,
105
+ "special": true
106
+ },
107
+ "151654": {
108
+ "content": "<|vision_pad|>",
109
+ "single_word": false,
110
+ "lstrip": false,
111
+ "rstrip": false,
112
+ "normalized": false,
113
+ "special": true
114
+ },
115
+ "151655": {
116
+ "content": "<|image_pad|>",
117
+ "single_word": false,
118
+ "lstrip": false,
119
+ "rstrip": false,
120
+ "normalized": false,
121
+ "special": true
122
+ },
123
+ "151656": {
124
+ "content": "<|video_pad|>",
125
+ "single_word": false,
126
+ "lstrip": false,
127
+ "rstrip": false,
128
+ "normalized": false,
129
+ "special": true
130
+ },
131
+ "151657": {
132
+ "content": "<tool_call>",
133
+ "single_word": false,
134
+ "lstrip": false,
135
+ "rstrip": false,
136
+ "normalized": false,
137
+ "special": false
138
+ },
139
+ "151658": {
140
+ "content": "</tool_call>",
141
+ "single_word": false,
142
+ "lstrip": false,
143
+ "rstrip": false,
144
+ "normalized": false,
145
+ "special": false
146
+ },
147
+ "151659": {
148
+ "content": "<|fim_prefix|>",
149
+ "single_word": false,
150
+ "lstrip": false,
151
+ "rstrip": false,
152
+ "normalized": false,
153
+ "special": false
154
+ },
155
+ "151660": {
156
+ "content": "<|fim_middle|>",
157
+ "single_word": false,
158
+ "lstrip": false,
159
+ "rstrip": false,
160
+ "normalized": false,
161
+ "special": false
162
+ },
163
+ "151661": {
164
+ "content": "<|fim_suffix|>",
165
+ "single_word": false,
166
+ "lstrip": false,
167
+ "rstrip": false,
168
+ "normalized": false,
169
+ "special": false
170
+ },
171
+ "151662": {
172
+ "content": "<|fim_pad|>",
173
+ "single_word": false,
174
+ "lstrip": false,
175
+ "rstrip": false,
176
+ "normalized": false,
177
+ "special": false
178
+ },
179
+ "151663": {
180
+ "content": "<|repo_name|>",
181
+ "single_word": false,
182
+ "lstrip": false,
183
+ "rstrip": false,
184
+ "normalized": false,
185
+ "special": false
186
+ },
187
+ "151664": {
188
+ "content": "<|file_sep|>",
189
+ "single_word": false,
190
+ "lstrip": false,
191
+ "rstrip": false,
192
+ "normalized": false,
193
+ "special": false
194
+ }
195
+ }
196
+ }