maywell commited on
Commit
5a1b9d7
ยท
1 Parent(s): 05f158b

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +60 -0
README.md CHANGED
@@ -1,3 +1,63 @@
1
  ---
 
 
 
 
 
2
  license: cc-by-nc-4.0
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ language:
3
+ - ko
4
+
5
+ library_name: transformers
6
+ pipeline_tag: text-generation
7
  license: cc-by-nc-4.0
8
  ---
9
+
10
+ # **Synatra-V0.1-7B**
11
+
12
+ ## Model Details
13
+
14
+ **Base Model**
15
+ [mistralai/Mistral-7B-Instruct-v0.1](https://huggingface.co/mistralai/Mistral-7B-Instruct-v0.1)
16
+
17
+ **Trained On**
18
+ A6000 48GB * 8
19
+
20
+ ## Instruction format
21
+
22
+ In order to leverage instruction fine-tuning, your prompt should be surrounded by `[INST]` and `[/INST]` tokens. The very first instruction should begin with a begin of sentence id. The next instructions should not. The assistant generation will be ended by the end-of-sentence token id.
23
+ Plus, It is strongly recommended to add a space at the end of the prompt.
24
+
25
+ E.g.
26
+ ```
27
+ text = "<s>[INST] ์•„์ด์ž‘ ๋‰ดํ„ด์˜ ์—…์ ์„ ์•Œ๋ ค์ค˜. [/INST] "
28
+ ```
29
+
30
+ # **Model Benchmark**
31
+
32
+ Preparing...
33
+
34
+ # Implementation Code
35
+
36
+ Since, chat_template already contains insturction format above.
37
+ You can use the code below.
38
+
39
+ ```python
40
+ from transformers import AutoModelForCausalLM, AutoTokenizer
41
+
42
+ device = "cuda" # the device to load the model onto
43
+
44
+ model = AutoModelForCausalLM.from_pretrained("mistralai/Mistral-7B-Instruct-v0.1")
45
+ tokenizer = AutoTokenizer.from_pretrained("mistralai/Mistral-7B-Instruct-v0.1")
46
+
47
+ messages = [
48
+ {"role": "user", "content": "What is your favourite condiment?"},
49
+ ]
50
+
51
+ encodeds = tokenizer.apply_chat_template(messages, return_tensors="pt")
52
+
53
+ model_inputs = encodeds.to(device)
54
+ model.to(device)
55
+
56
+ generated_ids = model.generate(model_inputs, max_new_tokens=1000, do_sample=True)
57
+ decoded = tokenizer.batch_decode(generated_ids)
58
+ print(decoded[0])
59
+ ```
60
+
61
+ > Readme format: [beomi/llama-2-ko-7b](https://huggingface.co/beomi/llama-2-ko-7b)
62
+
63
+ ---