Update README.md
Browse files
README.md
CHANGED
@@ -21,7 +21,7 @@ The DictaLM-2.0-Instruct Large Language Model (LLM) is an instruct fine-tuned ve
|
|
21 |
|
22 |
For full details of this model please read our [release blog post](https://example.com).
|
23 |
|
24 |
-
This is the instruct-tuned full-precision model designed for chat.
|
25 |
|
26 |
You can view and access the full collection of base/instruct unquantized/quantized versions of `DictaLM-2.0` [here](https://huggingface.co/collections/dicta-il/dicta-lm-20-collection-661bbda397df671e4a430c27).
|
27 |
|
@@ -31,8 +31,8 @@ In order to leverage instruction fine-tuning, your prompt should be surrounded b
|
|
31 |
|
32 |
E.g.
|
33 |
```
|
34 |
-
text = """<s>[INST]
|
35 |
-
|
36 |
```
|
37 |
|
38 |
This format is available as a [chat template](https://huggingface.co/docs/transformers/main/chat_templating) via the `apply_chat_template()` method:
|
@@ -49,7 +49,7 @@ model = AutoModelForCausalLM.from_pretrained("dicta-il/dictalm2.0-instruct", tor
|
|
49 |
tokenizer = AutoTokenizer.from_pretrained("dicta-il/dictalm2.0-instruct")
|
50 |
|
51 |
messages = [
|
52 |
-
{"role": "user", "content": "
|
53 |
{"role": "assistant", "content": "ืืื, ืื ื ืื ืืืื ืืื ืืืคืืช ืืืฅ ืืืืื ืกืืื ืืจื. ืื ืืืกืืฃ ืืืืืง ืืช ืืืืืช ืื ืืื ื ืฉื ืืขื ืืืฆืืฅ ืืื ืื ืฉืื ื ืืืฉื ืืืืื!"},
|
54 |
{"role": "user", "content": "ืืื ืืฉ ืื ืืชืืื ืื ืืืืื ื?"}
|
55 |
]
|
@@ -59,7 +59,7 @@ encoded = tokenizer.apply_chat_template(messages, return_tensors="pt").to(device
|
|
59 |
generated_ids = model.generate(encoded, max_new_tokens=50, do_sample=True)
|
60 |
decoded = tokenizer.batch_decode(generated_ids)
|
61 |
print(decoded[0])
|
62 |
-
# <s> [INST]
|
63 |
# ืืื, ืื ื ืื ืืืื ืืื ืืืคืืช ืืืฅ ืืืืื ืกืืื ืืจื. ืื ืืืกืืฃ ืืืืืง ืืช ืืืืืช ืื ืืื ื ืฉื ืืขื ืืืฆืืฅ ืืื ืื ืฉืื ื ืืืฉื ืืืืื!</s> [INST] ืืื ืืฉ ืื ืืชืืื ืื ืืืืื ื? [/INST]
|
64 |
# ืืื, ืื ื ืืชืืื ืืกืืกื ืืงื ืืืื ืช ืืืื ื ืืืชื!
|
65 |
#
|
|
|
21 |
|
22 |
For full details of this model please read our [release blog post](https://example.com).
|
23 |
|
24 |
+
This is the instruct-tuned full-precision model designed for chat. You can try the model out on a live demo [here](https://huggingface.co/spaces/dicta-il/dictalm2.0-instruct-demo).
|
25 |
|
26 |
You can view and access the full collection of base/instruct unquantized/quantized versions of `DictaLM-2.0` [here](https://huggingface.co/collections/dicta-il/dicta-lm-20-collection-661bbda397df671e4a430c27).
|
27 |
|
|
|
31 |
|
32 |
E.g.
|
33 |
```
|
34 |
+
text = """<s>[INST] ืืืื ืจืืื ืืืื ืขืืื? [/INST]
|
35 |
+
ืืื, ืื ื ืื ืืืื ืืื ืืืคืืช ืืืฅ ืืืืื ืกืืื ืืจื. ืื ืืืกืืฃ ืืืืืง ืืช ืืืืืช ืื ืืื ื ืฉื ืืขื ืืืฆืืฅ ืืื ืื ืฉืื ื ืืืฉื ืืืืื!</s>[INST] ืืื ืืฉ ืื ืืชืืื ืื ืืืืื ื? [/INST]"
|
36 |
```
|
37 |
|
38 |
This format is available as a [chat template](https://huggingface.co/docs/transformers/main/chat_templating) via the `apply_chat_template()` method:
|
|
|
49 |
tokenizer = AutoTokenizer.from_pretrained("dicta-il/dictalm2.0-instruct")
|
50 |
|
51 |
messages = [
|
52 |
+
{"role": "user", "content": "ืืืื ืจืืื ืืืื ืขืืื?"},
|
53 |
{"role": "assistant", "content": "ืืื, ืื ื ืื ืืืื ืืื ืืืคืืช ืืืฅ ืืืืื ืกืืื ืืจื. ืื ืืืกืืฃ ืืืืืง ืืช ืืืืืช ืื ืืื ื ืฉื ืืขื ืืืฆืืฅ ืืื ืื ืฉืื ื ืืืฉื ืืืืื!"},
|
54 |
{"role": "user", "content": "ืืื ืืฉ ืื ืืชืืื ืื ืืืืื ื?"}
|
55 |
]
|
|
|
59 |
generated_ids = model.generate(encoded, max_new_tokens=50, do_sample=True)
|
60 |
decoded = tokenizer.batch_decode(generated_ids)
|
61 |
print(decoded[0])
|
62 |
+
# <s> [INST] ืืืื ืจืืื ืืืื ืขืืื? [/INST]
|
63 |
# ืืื, ืื ื ืื ืืืื ืืื ืืืคืืช ืืืฅ ืืืืื ืกืืื ืืจื. ืื ืืืกืืฃ ืืืืืง ืืช ืืืืืช ืื ืืื ื ืฉื ืืขื ืืืฆืืฅ ืืื ืื ืฉืื ื ืืืฉื ืืืืื!</s> [INST] ืืื ืืฉ ืื ืืชืืื ืื ืืืืื ื? [/INST]
|
64 |
# ืืื, ืื ื ืืชืืื ืืกืืกื ืืงื ืืืื ืช ืืืื ื ืืืชื!
|
65 |
#
|