qqc1989 commited on
Commit
a00aaa5
·
verified ·
1 Parent(s): 1a6e584

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +171 -172
README.md CHANGED
@@ -1,172 +1,171 @@
1
- ---
2
- license: bsd-3-clause
3
- ---
4
- language:
5
- - en
6
- - zh
7
- base_model:
8
- - HuggingFaceTB/SmolLM3-3B
9
- pipeline_tag: text-generation
10
- tags:
11
- - HuggingFaceTB
12
- - SmolLM3-3B
13
- ---
14
-
15
- # SmolLM3-3B-Int8
16
-
17
- This version of SmolLM3-3B has been converted to run on the Axera NPU using **w8a16** quantization.
18
-
19
- Compatible with Pulsar2 version: 4.1
20
-
21
- ## Convert tools links:
22
-
23
- For those who are interested in model conversion, you can try to export axmodel through the original repo:
24
- - https://huggingface.co/HuggingFaceTB/SmolLM3-3B
25
-
26
- - [Github for SmolLM3-3B.axera](https://github.com/AXERA-TECH/SmolLM3-3B.axera)
27
-
28
- - [Pulsar2 Link, How to Convert LLM from Huggingface to axmodel](https://pulsar2-docs.readthedocs.io/en/latest/appendix/build_llm.html)
29
-
30
- ## Support Platform
31
- - AX650
32
- - [M4N-Dock(爱芯派Pro)](https://wiki.sipeed.com/hardware/zh/maixIV/m4ndock/m4ndock.html)
33
-
34
- ## How to use
35
-
36
- Download all files from this repository to the device.
37
-
38
- **Using AX650 Board**
39
-
40
- ```bash
41
- ai@ai-bj ~/yongqiang/push_hugging_face/SmolLM3-3B $ tree -L 1
42
- .
43
- ├── config.json
44
- ├── infer_axmodel.py
45
- ├── README.md
46
- ├── smollm3_axmodel
47
- ├── smolvlm3_tokenizer
48
- └── utils
49
-
50
- 3 directories, 3 files
51
- ```
52
-
53
- #### Inference with AX650 Host, such as M4N-Dock(爱芯派Pro) or AX650N DEMO Board
54
-
55
- input text:
56
-
57
- ```
58
- 帮我求解函数y=3x^2+1的导数.
59
- ```
60
-
61
- log information(including the thinking process):
62
-
63
- ```bash
64
- $ python3 infer_axmodel.py -q "帮我求解函数y=3x^2+1的导数." # 默认开启 think
65
- ...
66
- Model loaded successfully!
67
- slice_indices: [0, 1, 2]
68
- Slice prefill done: 0
69
- Slice prefill done: 1
70
- Slice prefill done: 2
71
- answer >> <think>
72
- Okay, so I need to find the derivative of the function y = 3x² + 1. Hmm, let me think about how to approach this. I remember that when taking derivatives, we use the^@ power rule. The power rule says that if you have a function like x^n, its derivative is n*x^(n-1). Right? So, for each term in the function, I can apply this rule.
73
-
74
- First, let's break down the function into its components. The function is 3x^@² + 1. The first term is 3x², and the second term is 1. The constant term 1 doesn't have an x in it, so when I take the derivative of 1, it should be 0 because the derivative of a constant is zero. That part seems straightforward^@.
75
-
76
- Now, the main part is the term 3x². Here, the coefficient is 3, and the exponent is 2. Applying the power rule, the derivative of x² is 2x. But since there's a coefficient 3 in front of the x², I need to multiply^@ the derivative of the function by that coefficient. So, 3 times the derivative of x², which is 2x. That gives me 3*2x = 6x. So the derivative of 3x² is 6x.
77
-
78
- Putting it all together, the derivative of the entire function^@ y = 3x² + 1 should be the derivative of 3x² plus the derivative of 1. The derivative of 3x² is 6x, and the derivative of 1 is 0. Therefore, the derivative of the whole function is 6x + 0,^@ which simplifies to 6x.
79
-
80
- Wait, let me double-check that. If I have a function like 3x², the derivative is 6x. Let me verify that with the power rule. The power rule states that if you have a function f(x) = ax^n, then f'(^@x) = a*n*x^(n-1). In this case, a is 3 and n is 2. So f'(x) = 3*2*x^(2-1) = 6x. Yes, that's correct. So the derivative of 3x² is indeed ^@6x. And the derivative of the constant 1 is 0. So combining those, the derivative of the entire function is 6x. That seems right.
81
-
82
- Is there anything else I need to consider here? Maybe I should check if there are any other terms or if I missed any steps. The original^@ function is a simple polynomial, so there shouldn't be any hidden complexities here. The power rule applies straightforwardly to each term. Since there are no other terms besides the 3x² and the constant, the process is complete.
83
-
84
- Another way to think about it is to consider the limit definition of a derivative.^@ If I were to use the limit definition, the derivative of 3x² + 1 would be the limit as h approaches 0 of [ (3(x+h)² + 1) - (3x² + 1) ] / h. Simplifying that expression would lead me through the^@ same steps as before, but since I already applied the power rule, I can be confident that the result is correct.
85
-
86
- Therefore, after going through the process step by step, I can be sure that the derivative of y = 3x² + 1 is indeed 6x. There's no mistake^@ in the calculation, and all the steps follow logically from the power rule. So the final answer is 6x.
87
-
88
- Just to recap, the key steps were:
89
-
90
- 1. Identify the function: 3x² + 1.
91
- 2. Apply the power rule to each term.
92
- 3. For the term^@ 3x², the derivative is 3*2x^(2-1) = 6x.
93
- 4. For the term 1, the derivative is 0.
94
- 5. Combine the derivatives: 6x + 0 = 6x.
95
-
96
- Yes, that all checks out. I^@ think that's thorough enough. I don't see any errors in this reasoning. Therefore, the derivative of the function y = 3x² + 1 is 6x.
97
-
98
- **Final Answer**
99
- The derivative of the function \( y = 3x^2 + 1 \) is \(\boxed{6x}\).
100
- </think>
101
- To find the derivative of the function \( y = 3x^2 + 1 \), we can use the power rule of differentiation. The power rule states that if we have a function of the form \( ax^n \), its derivative is \( a \cdot^@ n \cdot x^{n-1} \).
102
-
103
- 1. **Identify the terms in the function:**
104
- - The first term is \( 3x^2 \).
105
- - The second term is \( 1 \).
106
-
107
- 2. **Apply the power rule to each term:**
108
- ^@ - For the term \( 3x^2 \):
109
- - The coefficient \( a \) is 3.
110
- - The exponent \( n \) is 2.
111
- - The derivative is \( 3 \cdot 2 \cdot x^{2-1} = 6x \).
112
- ^@ - For the term \( 1 \):
113
- - The derivative of a constant is 0.
114
-
115
- 3. **Combine the results:**
116
- - The derivative of \( 3x^2 \) is \( 6x \).
117
- - The derivative of \( 1 \) is \( ^@0 \).
118
-
119
- 4. **Final result:**
120
- - The derivative of the entire function \( 3x^2 + 1 \) is \( 6x + 0 = 6x \).
121
-
122
- Thus, the derivative of the function \( y = 3x^2 + 1^@ \) is \( 6x \).
123
-
124
- \[
125
- \boxed{6x}
126
- \]
127
- ```
128
-
129
- use the parameter `--disable-think` to disable the thinking process:
130
-
131
- ```sh
132
- $ python3 infer_axmodel.py -q "帮我求解函数y=3x^2+1的导数." --disable-think
133
-
134
- Model loaded successfully!
135
- slice_indices: [0]
136
- Slice prefill done: 0
137
- answer >> 要求解函数 \( y = 3x^2 + 1 \) 的导数,我们可以使用导数的基本规则。
138
-
139
- 函数导数的导数可以通过导数的导数规则来求解。对于多项式^@函数,导数可以通过导数的导数规则来求解。对于函数 \( y = 3x^2 + 1 \),我们可以逐步求导:
140
-
141
- 1. **求导函数 \( y = 3x^2 \)**:
142
- 根据导数的导^@数规则,导数规则中对于 \( x^n \) 的导数规则,导数规则为:
143
- \[
144
- \frac{d}{dx} (x^n) = n x^{n-1}
145
- \]
146
- 在这里,\( n = 2^@ \),所以:
147
- \[
148
- \frac{d}{dx} (3x^2) = 3 \cdot \frac{d}{dx} (x^2) = 3 \cdot 2x^{2-1} = 6x
149
- \]
150
-
151
- 2. **求^@导数规则中的常数项**:
152
- 对于常数项 \( 1 \),其导数为零,因为导数规则中常数项的导数为零:
153
- \[
154
- \frac{d}{dx} (1) = 0
155
- \]
156
-
157
- 将^@以上结果结合起来,我们得到:
158
- \[
159
- \frac{d}{dx} (y) = \frac{d}{dx} (3x^2 + 1) = 6x + 0 = 6x
160
- \]
161
-
162
- 因此,函数 \( y = 3x^2 +^@ 1 \) 的导数为:
163
- \[
164
- \frac{dy}{dx} = 6x
165
- \]
166
-
167
- 所以,求解函数 \( y = 3x^2 + 1 \) 的导数,我们得到:
168
- \[
169
- \frac{d}{dx} (3x^^@2 + 1) = 6x
170
- \]
171
-
172
- ```
 
1
+ ---
2
+ license: bsd-3-clause
3
+ language:
4
+ - en
5
+ - zh
6
+ base_model:
7
+ - HuggingFaceTB/SmolLM3-3B
8
+ pipeline_tag: text-generation
9
+ tags:
10
+ - HuggingFaceTB
11
+ - SmolLM3-3B
12
+ ---
13
+
14
+ # SmolLM3-3B-Int8
15
+
16
+ This version of SmolLM3-3B has been converted to run on the Axera NPU using **w8a16** quantization.
17
+
18
+ Compatible with Pulsar2 version: 4.1
19
+
20
+ ## Convert tools links:
21
+
22
+ For those who are interested in model conversion, you can try to export axmodel through the original repo:
23
+ - https://huggingface.co/HuggingFaceTB/SmolLM3-3B
24
+
25
+ - [Github for SmolLM3-3B.axera](https://github.com/AXERA-TECH/SmolLM3-3B.axera)
26
+
27
+ - [Pulsar2 Link, How to Convert LLM from Huggingface to axmodel](https://pulsar2-docs.readthedocs.io/en/latest/appendix/build_llm.html)
28
+
29
+ ## Support Platform
30
+ - AX650
31
+ - [M4N-Dock(爱芯派Pro)](https://wiki.sipeed.com/hardware/zh/maixIV/m4ndock/m4ndock.html)
32
+
33
+ ## How to use
34
+
35
+ Download all files from this repository to the device.
36
+
37
+ **Using AX650 Board**
38
+
39
+ ```bash
40
+ ai@ai-bj ~/yongqiang/push_hugging_face/SmolLM3-3B $ tree -L 1
41
+ .
42
+ ├── config.json
43
+ ├── infer_axmodel.py
44
+ ├── README.md
45
+ ├── smollm3_axmodel
46
+ ├── smolvlm3_tokenizer
47
+ └── utils
48
+
49
+ 3 directories, 3 files
50
+ ```
51
+
52
+ #### Inference with AX650 Host, such as M4N-Dock(爱芯派Pro) or AX650N DEMO Board
53
+
54
+ input text:
55
+
56
+ ```
57
+ 帮我求解函数y=3x^2+1的导数.
58
+ ```
59
+
60
+ log information(including the thinking process):
61
+
62
+ ```bash
63
+ $ python3 infer_axmodel.py -q "帮我求解函数y=3x^2+1的导数." # 默认开启 think
64
+ ...
65
+ Model loaded successfully!
66
+ slice_indices: [0, 1, 2]
67
+ Slice prefill done: 0
68
+ Slice prefill done: 1
69
+ Slice prefill done: 2
70
+ answer >> <think>
71
+ Okay, so I need to find the derivative of the function y = 3x² + 1. Hmm, let me think about how to approach this. I remember that when taking derivatives, we use the^@ power rule. The power rule says that if you have a function like x^n, its derivative is n*x^(n-1). Right? So, for each term in the function, I can apply this rule.
72
+
73
+ First, let's break down the function into its components. The function is 3x^@² + 1. The first term is 3x², and the second term is 1. The constant term 1 doesn't have an x in it, so when I take the derivative of 1, it should be 0 because the derivative of a constant is zero. That part seems straightforward^@.
74
+
75
+ Now, the main part is the term 3x². Here, the coefficient is 3, and the exponent is 2. Applying the power rule, the derivative of x² is 2x. But since there's a coefficient 3 in front of the x², I need to multiply^@ the derivative of the function by that coefficient. So, 3 times the derivative of x², which is 2x. That gives me 3*2x = 6x. So the derivative of 3x² is 6x.
76
+
77
+ Putting it all together, the derivative of the entire function^@ y = 3x² + 1 should be the derivative of 3x² plus the derivative of 1. The derivative of 3x² is 6x, and the derivative of 1 is 0. Therefore, the derivative of the whole function is 6x + 0,^@ which simplifies to 6x.
78
+
79
+ Wait, let me double-check that. If I have a function like 3x², the derivative is 6x. Let me verify that with the power rule. The power rule states that if you have a function f(x) = ax^n, then f'(^@x) = a*n*x^(n-1). In this case, a is 3 and n is 2. So f'(x) = 3*2*x^(2-1) = 6x. Yes, that's correct. So the derivative of 3x² is indeed ^@6x. And the derivative of the constant 1 is 0. So combining those, the derivative of the entire function is 6x. That seems right.
80
+
81
+ Is there anything else I need to consider here? Maybe I should check if there are any other terms or if I missed any steps. The original^@ function is a simple polynomial, so there shouldn't be any hidden complexities here. The power rule applies straightforwardly to each term. Since there are no other terms besides the 3x² and the constant, the process is complete.
82
+
83
+ Another way to think about it is to consider the limit definition of a derivative.^@ If I were to use the limit definition, the derivative of 3x² + 1 would be the limit as h approaches 0 of [ (3(x+h)² + 1) - (3x² + 1) ] / h. Simplifying that expression would lead me through the^@ same steps as before, but since I already applied the power rule, I can be confident that the result is correct.
84
+
85
+ Therefore, after going through the process step by step, I can be sure that the derivative of y = 3x² + 1 is indeed 6x. There's no mistake^@ in the calculation, and all the steps follow logically from the power rule. So the final answer is 6x.
86
+
87
+ Just to recap, the key steps were:
88
+
89
+ 1. Identify the function: 3x² + 1.
90
+ 2. Apply the power rule to each term.
91
+ 3. For the term^@ 3x², the derivative is 3*2x^(2-1) = 6x.
92
+ 4. For the term 1, the derivative is 0.
93
+ 5. Combine the derivatives: 6x + 0 = 6x.
94
+
95
+ Yes, that all checks out. I^@ think that's thorough enough. I don't see any errors in this reasoning. Therefore, the derivative of the function y = 3x² + 1 is 6x.
96
+
97
+ **Final Answer**
98
+ The derivative of the function \( y = 3x^2 + 1 \) is \(\boxed{6x}\).
99
+ </think>
100
+ To find the derivative of the function \( y = 3x^2 + 1 \), we can use the power rule of differentiation. The power rule states that if we have a function of the form \( ax^n \), its derivative is \( a \cdot^@ n \cdot x^{n-1} \).
101
+
102
+ 1. **Identify the terms in the function:**
103
+ - The first term is \( 3x^2 \).
104
+ - The second term is \( 1 \).
105
+
106
+ 2. **Apply the power rule to each term:**
107
+ ^@ - For the term \( 3x^2 \):
108
+ - The coefficient \( a \) is 3.
109
+ - The exponent \( n \) is 2.
110
+ - The derivative is \( 3 \cdot 2 \cdot x^{2-1} = 6x \).
111
+ ^@ - For the term \( 1 \):
112
+ - The derivative of a constant is 0.
113
+
114
+ 3. **Combine the results:**
115
+ - The derivative of \( 3x^2 \) is \( 6x \).
116
+ - The derivative of \( 1 \) is \( ^@0 \).
117
+
118
+ 4. **Final result:**
119
+ - The derivative of the entire function \( 3x^2 + 1 \) is \( 6x + 0 = 6x \).
120
+
121
+ Thus, the derivative of the function \( y = 3x^2 + 1^@ \) is \( 6x \).
122
+
123
+ \[
124
+ \boxed{6x}
125
+ \]
126
+ ```
127
+
128
+ use the parameter `--disable-think` to disable the thinking process:
129
+
130
+ ```sh
131
+ $ python3 infer_axmodel.py -q "帮我求解函数y=3x^2+1的导数." --disable-think
132
+
133
+ Model loaded successfully!
134
+ slice_indices: [0]
135
+ Slice prefill done: 0
136
+ answer >> 要求解函数 \( y = 3x^2 + 1 \) 的导数,我们可以使用导数的基本规则。
137
+
138
+ 函数导数的导数可以通过导数的导数规则来求解。对于多项式^@函数,导数可以通过导数的导数规则来求解。对于函数 \( y = 3x^2 + 1 \),我们可以逐步求导:
139
+
140
+ 1. **求导函数 \( y = 3x^2 \)**:
141
+ 根据导数的导^@数规则,导数规则中对于 \( x^n \) 的导数规则,导数规则为:
142
+ \[
143
+ \frac{d}{dx} (x^n) = n x^{n-1}
144
+ \]
145
+ 在这里,\( n = 2^@ \),所以:
146
+ \[
147
+ \frac{d}{dx} (3x^2) = 3 \cdot \frac{d}{dx} (x^2) = 3 \cdot 2x^{2-1} = 6x
148
+ \]
149
+
150
+ 2. **求^@导数规则中的常数项**:
151
+ 对于常数项 \( 1 \),其导数为零,因为导数规则中常数项的导数为零:
152
+ \[
153
+ \frac{d}{dx} (1) = 0
154
+ \]
155
+
156
+ 将^@以上结果结合起来,我们得到:
157
+ \[
158
+ \frac{d}{dx} (y) = \frac{d}{dx} (3x^2 + 1) = 6x + 0 = 6x
159
+ \]
160
+
161
+ 因此,函数 \( y = 3x^2 +^@ 1 \) 的导数为:
162
+ \[
163
+ \frac{dy}{dx} = 6x
164
+ \]
165
+
166
+ 所以,求解函数 \( y = 3x^2 + 1 \) 的导数,我们得到:
167
+ \[
168
+ \frac{d}{dx} (3x^^@2 + 1) = 6x
169
+ \]
170
+
171
+ ```