deepseek-admin
commited on
Update README.md
Browse files
README.md
CHANGED
@@ -1,5 +1,57 @@
|
|
1 |
---
|
2 |
license: other
|
3 |
license_name: deepseek
|
4 |
-
license_link: LICENSE
|
5 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
---
|
2 |
license: other
|
3 |
license_name: deepseek
|
4 |
+
license_link: https://github.com/deepseek-ai/DeepSeek-Math/blob/main/LICENSE-MODEL
|
5 |
---
|
6 |
+
|
7 |
+
|
8 |
+
<p align="center">
|
9 |
+
<img width="500px" alt="DeepSeek Chat" src="https://github.com/deepseek-ai/DeepSeek-LLM/blob/main/images/logo.png?raw=true">
|
10 |
+
</p>
|
11 |
+
<p align="center"><a href="https://www.deepseek.com/">[🏠Homepage]</a> | <a href="https://chat.deepseek.com/">[🤖 Chat with DeepSeek LLM]</a> | <a href="https://discord.gg/Tc7c45Zzu5">[Discord]</a> | <a href="https://github.com/deepseek-ai/DeepSeek-LLM/blob/main/images/qr.jpeg">[Wechat(微信)]</a> </p>
|
12 |
+
|
13 |
+
<p align="center">
|
14 |
+
<a href="https://arxiv.org/pdf/xxx.pdf"><b>Paper Link</b>👁️</a>
|
15 |
+
</p>
|
16 |
+
|
17 |
+
<hr>
|
18 |
+
|
19 |
+
|
20 |
+
|
21 |
+
|
22 |
+
|
23 |
+
### 1. Introduction to DeepSeekMath
|
24 |
+
See the [Introduction](https://github.com/deepseek-ai/DeepSeek-Math) for more details.
|
25 |
+
|
26 |
+
### 2. How to Use
|
27 |
+
Here give some examples of how to use our model.
|
28 |
+
|
29 |
+
**Text Completion**
|
30 |
+
|
31 |
+
```python
|
32 |
+
import torch
|
33 |
+
from transformers import AutoTokenizer, AutoModelForCausalLM, GenerationConfig
|
34 |
+
|
35 |
+
model_name = "deepseek-ai/deepseek-math-7b-base"
|
36 |
+
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
37 |
+
model = AutoModelForCausalLM.from_pretrained(model_name, torch_dtype=torch.bfloat16, device_map="auto")
|
38 |
+
model.generation_config = GenerationConfig.from_pretrained(model_name)
|
39 |
+
model.generation_config.pad_token_id = model.generation_config.eos_token_id
|
40 |
+
|
41 |
+
text = "The integral of x^2 from 0 to 2 is"
|
42 |
+
inputs = tokenizer(text, return_tensors="pt")
|
43 |
+
outputs = model.generate(**inputs.to(model.device), max_new_tokens=100)
|
44 |
+
|
45 |
+
result = tokenizer.decode(outputs[0], skip_special_tokens=True)
|
46 |
+
print(result)
|
47 |
+
```
|
48 |
+
|
49 |
+
### 3. License
|
50 |
+
This code repository is licensed under the MIT License. The use of DeepSeekMath models is subject to the Model License. DeepSeekMath supports commercial use.
|
51 |
+
|
52 |
+
See the [LICENSE-MODEL](https://github.com/deepseek-ai/DeepSeek-Math/blob/main/LICENSE-MODEL) for more details.
|
53 |
+
|
54 |
+
### 4. Contact
|
55 |
+
|
56 |
+
If you have any questions, please raise an issue or contact us at [service@deepseek.com](mailto:service@deepseek.com).
|
57 |
+
|