Update README.md
Browse files
README.md
CHANGED
@@ -32,9 +32,15 @@ Deepseek-Coder-7B-Instruct-v1.5 is continue pre-trained from Deepseek-LLM 7B on
|
|
32 |
Here give some examples of how to use our model.
|
33 |
#### Chat Model Inference
|
34 |
```python
|
35 |
-
|
36 |
-
|
37 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
38 |
messages=[
|
39 |
{ 'role': 'user', 'content': "write a quick sort algorithm in python."}
|
40 |
]
|
|
|
32 |
Here give some examples of how to use our model.
|
33 |
#### Chat Model Inference
|
34 |
```python
|
35 |
+
import ctranslate2
|
36 |
+
import transformers
|
37 |
+
|
38 |
+
from huggingface_hub import snapshot_download
|
39 |
+
model_id = "ByteForge/DS-7b-1.5_Instruct-ct2-int8_float32"
|
40 |
+
model_path = snapshot_download(model_id)
|
41 |
+
model = ctranslate2.Generator(model_path, device='cuda')
|
42 |
+
tokenizer = transformers.AutoTokenizer.from_pretrained(model_id)
|
43 |
+
|
44 |
messages=[
|
45 |
{ 'role': 'user', 'content': "write a quick sort algorithm in python."}
|
46 |
]
|