Kaileh57 commited on
Commit
b36fb2a
·
verified ·
1 Parent(s): f241b7a

Ursa Minor v0.3

Browse files
README.md CHANGED
@@ -1,99 +1,202 @@
1
  ---
2
- license: apache-2.0
3
- datasets:
4
- - mlabonne/FineTome-100k
5
- language:
6
- - en
7
- base_model:
8
- - Qwen/Qwen2.5-1.5B-Instruct
9
  ---
10
- # Ursa Minor v0.2
11
 
12
- [![Apache License 2.0](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
13
 
14
- A reasoning-enhanced language model distilled from Google's Gemini 2.0 Flash Thinking into Qwen 1.5B. Version 0.2 shows significant improvement over v0.1, with enhanced reasoning capabilities and coherent text generation.
15
 
16
- ## Model Overview
17
 
18
- Ursa Minor v0.2 is designed to mimic the chain-of-thought reasoning patterns of Google's Gemini 2.0 Flash Thinking model. The model demonstrates step-by-step reasoning for problem-solving tasks and provides explanations with visible thought processes.
19
 
20
- ### Specifications
21
 
22
- - **Base Model**: Qwen 1.5B, a 1.5 billion parameter decoder-only transformer model
23
- - **Context Window**: 4096 tokens
24
- - **Tokenizer**: Same as Qwen 1.5B
25
- - **Parameter Count**: 1.5B
26
 
27
- ## Model Access
28
 
29
- The model is available on Hugging Face in two versions:
30
 
31
- - Original: [https://huggingface.co/Kaileh57/Ursa_Minor](https://huggingface.co/Kaileh57/Ursa_Minor)
32
- - Quantized: [https://huggingface.co/mradermacher/Ursa_Minor-GGUF](https://huggingface.co/mradermacher/Ursa_Minor-GGUF)
33
 
34
- ## Usage Example
 
 
 
 
 
 
35
 
36
- ```python
37
- from transformers import AutoModelForCausalLM, AutoTokenizer
38
 
39
- # Load the model and tokenizer
40
- model_path = "Kaileh57/Ursa_Minor"
41
- tokenizer = AutoTokenizer.from_pretrained(model_path)
42
- model = AutoModelForCausalLM.from_pretrained(model_path)
43
 
44
- # Create a reasoning prompt
45
- prompt = """Think through this step by step:
 
46
 
47
- How would you determine if a number is a prime number? Design an algorithm and trace through it for the number 29.
48
 
49
- """
50
 
51
- # Format the prompt
52
- formatted_prompt = tokenizer.apply_chat_template([
53
- {"role": "system", "content": "You are a helpful assistant."},
54
- {"role": "user", "content": prompt}
55
- ], tokenize=False)
56
 
57
- # Generate a response
58
- inputs = tokenizer(formatted_prompt, return_tensors="pt").to(model.device)
59
- outputs = model.generate(**inputs, max_new_tokens=1024, temperature=0.7)
60
- response = tokenizer.decode(outputs[0], skip_special_tokens=True)
61
 
62
- print(response)
63
- ```
64
 
65
- ## Training Methodology
66
 
67
- The model was created using knowledge distillation techniques, where Qwen 1.5B (student model) was trained to mimic the reasoning patterns of Gemini 2.0 Flash Thinking (teacher model). This approach transfers reasoning capabilities from the larger teacher model to the smaller student model.
68
 
69
- The distillation process used one of two primary methods:
70
- - **Logit-based distillation**: Where the student model is trained to produce similar output probability distributions as the teacher
71
- - **Hidden states-based distillation**: Where the internal representations of the student model are aligned with those of the teacher
72
 
73
- ## Intended Use
74
 
75
- This model is designed to:
76
 
77
- - Demonstrate step-by-step reasoning for problem-solving tasks
78
- - Break down complex problems into manageable components
79
- - Provide explanations with visible thought processes
80
- - Support educational scenarios where seeing the reasoning process is beneficial
81
 
82
- ## Limitations
83
 
84
- - **Reasoning Depth**: May not achieve the same reasoning depth as Gemini due to parameter count differences
85
- - **Scope**: Reasoning capabilities are limited to the types of problems it was exposed to during training
86
- - **Mathematical Accuracy**: May make calculation errors on complex mathematical problems
87
- - **Hallucination**: May occasionally generate plausible-sounding but incorrect reasoning steps
88
- - **Size Constraints**: At 1.5B parameters, has less capacity than larger models like Gemini
89
 
90
- ## Ethical Considerations
91
 
92
- - The model may inherit biases present in both the Qwen base model and the Gemini responses
93
- - Reasoning chains may occasionally reinforce stereotypes or contain subtle biases
94
- - The model should not be used for critical decision-making without human oversight
95
- - Responses should be verified for correctness, especially for domain-specific reasoning
96
 
97
- ## License
98
 
99
- This project is licensed under the Apache License 2.0.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ base_model: Qwen/Qwen2-1.5B-Instruct
3
+ library_name: peft
 
 
 
 
 
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
 
 
 
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]
200
+ ### Framework versions
201
+
202
+ - PEFT 0.14.0
adapter_config.json ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "alpha_pattern": {},
3
+ "auto_mapping": null,
4
+ "base_model_name_or_path": "Qwen/Qwen2-1.5B-Instruct",
5
+ "bias": "none",
6
+ "eva_config": null,
7
+ "exclude_modules": null,
8
+ "fan_in_fan_out": false,
9
+ "inference_mode": true,
10
+ "init_lora_weights": true,
11
+ "layer_replication": null,
12
+ "layers_pattern": null,
13
+ "layers_to_transform": null,
14
+ "loftq_config": {},
15
+ "lora_alpha": 32,
16
+ "lora_bias": false,
17
+ "lora_dropout": 0.05,
18
+ "megatron_config": null,
19
+ "megatron_core": "megatron.core",
20
+ "modules_to_save": null,
21
+ "peft_type": "LORA",
22
+ "r": 16,
23
+ "rank_pattern": {},
24
+ "revision": null,
25
+ "target_modules": [
26
+ "q_proj",
27
+ "down_proj",
28
+ "gate_proj",
29
+ "v_proj",
30
+ "o_proj",
31
+ "up_proj",
32
+ "k_proj"
33
+ ],
34
+ "task_type": "CAUSAL_LM",
35
+ "use_dora": false,
36
+ "use_rslora": false
37
+ }
adapter_model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1d6baae6a259181b49035e2e4339724a6e3551050c8b61dda9de0036ef8e49bb
3
+ size 73911112
added_tokens.json CHANGED
@@ -1,5 +1,5 @@
1
- {
2
- "<|endoftext|>": 151643,
3
- "<|im_end|>": 151645,
4
- "<|im_start|>": 151644
5
- }
 
1
+ {
2
+ "<|endoftext|>": 151643,
3
+ "<|im_end|>": 151645,
4
+ "<|im_start|>": 151644
5
+ }
special_tokens_map.json CHANGED
@@ -1,20 +1,20 @@
1
- {
2
- "additional_special_tokens": [
3
- "<|im_start|>",
4
- "<|im_end|>"
5
- ],
6
- "eos_token": {
7
- "content": "<|endoftext|>",
8
- "lstrip": false,
9
- "normalized": false,
10
- "rstrip": false,
11
- "single_word": false
12
- },
13
- "pad_token": {
14
- "content": "<|endoftext|>",
15
- "lstrip": false,
16
- "normalized": false,
17
- "rstrip": false,
18
- "single_word": false
19
- }
20
- }
 
1
+ {
2
+ "additional_special_tokens": [
3
+ "<|im_start|>",
4
+ "<|im_end|>"
5
+ ],
6
+ "eos_token": {
7
+ "content": "<|im_end|>",
8
+ "lstrip": false,
9
+ "normalized": false,
10
+ "rstrip": false,
11
+ "single_word": false
12
+ },
13
+ "pad_token": {
14
+ "content": "<|endoftext|>",
15
+ "lstrip": false,
16
+ "normalized": false,
17
+ "rstrip": false,
18
+ "single_word": false
19
+ }
20
+ }
tokenizer.json CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:a12e3ba5d5e0ad173cf7b408ab8534c6be8cbc6a146714e9c7dc8cf2346603b1
3
- size 7028043
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:bcfe42da0a4497e8b2b172c1f9f4ec423a46dc12907f4349c55025f670422ba9
3
+ size 11418266
tokenizer_config.json CHANGED
@@ -1,43 +1,43 @@
1
- {
2
- "add_prefix_space": false,
3
- "added_tokens_decoder": {
4
- "151643": {
5
- "content": "<|endoftext|>",
6
- "lstrip": false,
7
- "normalized": false,
8
- "rstrip": false,
9
- "single_word": false,
10
- "special": true
11
- },
12
- "151644": {
13
- "content": "<|im_start|>",
14
- "lstrip": false,
15
- "normalized": false,
16
- "rstrip": false,
17
- "single_word": false,
18
- "special": true
19
- },
20
- "151645": {
21
- "content": "<|im_end|>",
22
- "lstrip": false,
23
- "normalized": false,
24
- "rstrip": false,
25
- "single_word": false,
26
- "special": true
27
- }
28
- },
29
- "additional_special_tokens": [
30
- "<|im_start|>",
31
- "<|im_end|>"
32
- ],
33
- "bos_token": null,
34
- "chat_template": "{% for message in messages %}{% if loop.first and messages[0]['role'] != 'system' %}{{ '<|im_start|>system\nYou are a helpful assistant<|im_end|>\n' }}{% endif %}{{'<|im_start|>' + message['role'] + '\n' + message['content'] + '<|im_end|>' + '\n'}}{% endfor %}{% if add_generation_prompt %}{{ '<|im_start|>assistant\n' }}{% endif %}",
35
- "clean_up_tokenization_spaces": false,
36
- "eos_token": "<|endoftext|>",
37
- "errors": "replace",
38
- "model_max_length": 32768,
39
- "pad_token": "<|endoftext|>",
40
- "split_special_tokens": false,
41
- "tokenizer_class": "Qwen2Tokenizer",
42
- "unk_token": null
43
- }
 
1
+ {
2
+ "add_prefix_space": false,
3
+ "added_tokens_decoder": {
4
+ "151643": {
5
+ "content": "<|endoftext|>",
6
+ "lstrip": false,
7
+ "normalized": false,
8
+ "rstrip": false,
9
+ "single_word": false,
10
+ "special": true
11
+ },
12
+ "151644": {
13
+ "content": "<|im_start|>",
14
+ "lstrip": false,
15
+ "normalized": false,
16
+ "rstrip": false,
17
+ "single_word": false,
18
+ "special": true
19
+ },
20
+ "151645": {
21
+ "content": "<|im_end|>",
22
+ "lstrip": false,
23
+ "normalized": false,
24
+ "rstrip": false,
25
+ "single_word": false,
26
+ "special": true
27
+ }
28
+ },
29
+ "additional_special_tokens": [
30
+ "<|im_start|>",
31
+ "<|im_end|>"
32
+ ],
33
+ "bos_token": null,
34
+ "chat_template": "{% for message in messages %}{% if loop.first and messages[0]['role'] != 'system' %}{{ '<|im_start|>system\nYou are a helpful assistant.<|im_end|>\n' }}{% endif %}{{'<|im_start|>' + message['role'] + '\n' + message['content'] + '<|im_end|>' + '\n'}}{% endfor %}{% if add_generation_prompt %}{{ '<|im_start|>assistant\n' }}{% endif %}",
35
+ "clean_up_tokenization_spaces": false,
36
+ "eos_token": "<|im_end|>",
37
+ "errors": "replace",
38
+ "model_max_length": 32768,
39
+ "pad_token": "<|endoftext|>",
40
+ "split_special_tokens": false,
41
+ "tokenizer_class": "Qwen2Tokenizer",
42
+ "unk_token": null
43
+ }