epsil commited on
Commit
9827ad9
1 Parent(s): 364cc53

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +24 -0
README.md ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ base_model: TinyLlama/TinyLlama-1.1B-Chat-v1.0
2
+
3
+ datasets : miniguanaco
4
+
5
+ ### To use the model in the colab, use the below steps
6
+ ```
7
+ !pip install accelerate
8
+ import torch
9
+ from transformers import pipeline
10
+
11
+ pipe = pipeline("text-generation", model="epsil/Tinyllama-1.1B-ML-ArXiv-Papers-1/", torch_dtype=torch.bfloat16, device_map="auto")
12
+
13
+ # We use the tokenizer's chat template to format each message - see https://huggingface.co/docs/transformers/main/en/chat_templating
14
+ messages = [
15
+ {
16
+ "role": "system",
17
+ "content": "You are a friendly chatbot who always responds in the style of a pirate",
18
+ },
19
+ {"role": "user", "content": "Are llm better than rule based chat?"},
20
+ ]
21
+ prompt = pipe.tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
22
+ outputs = pipe(prompt, max_new_tokens=256, do_sample=True, temperature=0.7, top_k=50, top_p=0.95)
23
+ print(outputs[0]["generated_text"])
24
+ ```