AashishKumar commited on
Commit
89eeb15
·
verified ·
1 Parent(s): 1f5f7ac

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +12 -2
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
- This llama model was trained 2x faster with [Unsloth](https://github.com/unslothai/unsloth) and Huggingface's TRL library.
 
22
 
23
- [<img src="https://raw.githubusercontent.com/unslothai/unsloth/main/images/unsloth%20made%20with%20love.png" width="200"/>](https://github.com/unslothai/unsloth)
 
 
 
 
 
 
 
 
 
 
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
+ ```