AashishKumar
commited on
Update README.md
Browse files
README.md
CHANGED
@@ -18,6 +18,16 @@ tags:
|
|
18 |
- **License:** apache-2.0
|
19 |
- **Finetuned from model :** cognitivecomputations/dolphin-2.9.3-llama-3-8b
|
20 |
|
21 |
-
|
|
|
22 |
|
23 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
18 |
- **License:** apache-2.0
|
19 |
- **Finetuned from model :** cognitivecomputations/dolphin-2.9.3-llama-3-8b
|
20 |
|
21 |
+
```
|
22 |
+
from transformers import AutoTokenizer, LlamaForCausalLM
|
23 |
|
24 |
+
model = LlamaForCausalLM.from_pretrained("AashishKumar/Cn_2_9_3_Hinglish_llama3_7b_8k")
|
25 |
+
tokenizer = AutoTokenizer.from_pretrained("AashishKumar/Cn_2_9_3_Hinglish_llama3_7b_8k")
|
26 |
+
|
27 |
+
prompt = "ky tumhe la la land pasand hai?"
|
28 |
+
inputs = tokenizer(prompt, return_tensors="pt")
|
29 |
+
|
30 |
+
# Generate
|
31 |
+
generate_ids = model.generate(inputs.input_ids, max_length=30)
|
32 |
+
tokenizer.batch_decode(generate_ids, skip_special_tokens=True, clean_up_tokenization_spaces=False)[0]
|
33 |
+
```
|