AIGym commited on
Commit
4faf529
1 Parent(s): 43ede73

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +33 -2
README.md CHANGED
@@ -4,8 +4,39 @@ It was created by starting with the deepseek-coder-6.7B and training it on the o
4
  # Reson
5
  This model was fine tned to allow it to follow direction and is a steeping stone to further training, but still would be good for asking qestions about code.
6
 
7
- # Templete
8
- Us the following templete when interacting with the fine tuned model.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9
 
10
  # Referrals
11
  Run Pod - This is who I use to train th emodels on huggingface. If you use it we both get free crdits. - <a href="https://runpod.io?ref=kilq83n1" target="_blank" style="color: #3498db; text-decoration: none; font-weight: bold;">Visit Runpod's Website!</a>
 
4
  # Reson
5
  This model was fine tned to allow it to follow direction and is a steeping stone to further training, but still would be good for asking qestions about code.
6
 
7
+ # How to use
8
+ You will need the transformers>=4.31
9
+ ```python
10
+ from transformers import AutoTokenizer
11
+ import transformers
12
+ import torch
13
+ model = "AIGym/deepseek-coder-6.7b-chat"
14
+ tokenizer = AutoTokenizer.from_pretrained(model)
15
+ pipeline = transformers.pipeline(
16
+ "text-generation",
17
+ model=model,
18
+ torch_dtype=torch.float16,
19
+ device_map="auto",
20
+ )
21
+
22
+ prompt = "What are the values in open source projects?"
23
+ formatted_prompt = (
24
+ f"### Human: {prompt}### Assistant:"
25
+ )
26
+
27
+
28
+ sequences = pipeline(
29
+ formatted_prompt,
30
+ do_sample=True,
31
+ top_k=50,
32
+ top_p = 0.7,
33
+ num_return_sequences=1,
34
+ repetition_penalty=1.1,
35
+ max_new_tokens=500,
36
+ )
37
+ for seq in sequences:
38
+ print(f"Result: {seq['generated_text']}")
39
+ ```
40
 
41
  # Referrals
42
  Run Pod - This is who I use to train th emodels on huggingface. If you use it we both get free crdits. - <a href="https://runpod.io?ref=kilq83n1" target="_blank" style="color: #3498db; text-decoration: none; font-weight: bold;">Visit Runpod's Website!</a>