deepseek-admin commited on
Commit
053b477
·
verified ·
1 Parent(s): e66d398

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +44 -0
README.md CHANGED
@@ -3,3 +3,47 @@ license: other
3
  license_name: deepseek
4
  license_link: LICENSE
5
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  license_name: deepseek
4
  license_link: LICENSE
5
  ---
6
+
7
+ <p align="center">
8
+ <img width="1000px" alt="DeepSeek Coder" src="https://github.com/deepseek-ai/DeepSeek-Coder/blob/main/pictures/logo.png?raw=true">
9
+ </p>
10
+ <p align="center"><a href="https://www.deepseek.com/">[🏠Homepage]</a> | <a href="https://coder.deepseek.com/">[🤖 Chat with DeepSeek Coder]</a> | <a href="https://discord.gg/Tc7c45Zzu5">[Discord]</a> | <a href="https://github.com/guoday/assert/blob/main/QR.png?raw=true">[Wechat(微信)]</a> </p>
11
+ <hr>
12
+
13
+
14
+
15
+
16
+ ### 1. Introduction of Deepseek-Coder-7B-Instruct v1.5
17
+
18
+ Deepseek-Coder-7B-Instruct-v1.5 is trained from Deepseek-LLM 7B on 2T tokens by employing a window size of 4K and next token prediction objective and then fine-tuned on 2B tokens of instruction data.
19
+
20
+ - **Home Page:** [DeepSeek](https://deepseek.com/)
21
+ - **Repository:** [deepseek-ai/deepseek-coder](https://github.com/deepseek-ai/deepseek-coder)
22
+ - **Chat With DeepSeek Coder:** [DeepSeek-Coder](https://coder.deepseek.com/)
23
+
24
+
25
+ ### 2. How to Use
26
+ Here give some examples of how to use our model.
27
+ #### Chat Model Inference
28
+ ```python
29
+ from transformers import AutoTokenizer, AutoModelForCausalLM
30
+ tokenizer = AutoTokenizer.from_pretrained("deepseek-ai/deepseek-coder-7b-instruct-v1.5", trust_remote_code=True)
31
+ model = AutoModelForCausalLM.from_pretrained("deepseek-ai/deepseek-coder-7b-instruct-v1.5", trust_remote_code=True).cuda()
32
+ messages=[
33
+ { 'role': 'user', 'content': "write a quick sort algorithm in python."}
34
+ ]
35
+ inputs = tokenizer.apply_chat_template(messages, add_generation_prompt=True, return_tensors="pt").to(model.device)
36
+
37
+ outputs = model.generate(inputs, max_new_tokens=512, do_sample=False, top_k=50, top_p=0.95, num_return_sequences=1, eos_token_id=tokenizer.eos_token_id)
38
+ print(tokenizer.decode(outputs[0][len(inputs[0]):], skip_special_tokens=True))
39
+ ```
40
+
41
+ ### 3. License
42
+ This code repository is licensed under the MIT License. The use of DeepSeek Coder models is subject to the Model License. DeepSeek Coder supports commercial use.
43
+
44
+ See the [LICENSE-MODEL](https://github.com/deepseek-ai/deepseek-coder/blob/main/LICENSE-MODEL) for more details.
45
+
46
+ ### 4. Contact
47
+
48
+ If you have any questions, please raise an issue or contact us at [[email protected]](mailto:[email protected]).
49
+