RonanMcGovern commited on
Commit
37fa59e
•
1 Parent(s): aa15e6b

model card

Browse files
Files changed (1) hide show
  1. README.md +63 -0
README.md ADDED
@@ -0,0 +1,63 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ datasets:
4
+ - cerebras/SlimPajama-627B
5
+ - bigcode/starcoderdata
6
+ - OpenAssistant/oasst_top1_2023-08-25
7
+ language:
8
+ - en
9
+ tags:
10
+ - awq
11
+ - tinyllama
12
+ ---
13
+ # AWQ version of TinyLlama at 1Trillion tokens
14
+
15
+ original model card follows below.
16
+
17
+ # TinyLlama-1.1B
18
+ </div>
19
+
20
+ https://github.com/jzhang38/TinyLlama
21
+
22
+ The TinyLlama project aims to **pretrain** a **1.1B Llama model on 3 trillion tokens**. With some proper optimization, we can achieve this within a span of "just" 90 days using 16 A100-40G GPUs 🚀🚀. The training has started on 2023-09-01.
23
+
24
+
25
+ We adopted exactly the same architecture and tokenizer as Llama 2. This means TinyLlama can be plugged and played in many open-source projects built upon Llama. Besides, TinyLlama is compact with only 1.1B parameters. This compactness allows it to cater to a multitude of applications demanding a restricted computation and memory footprint.
26
+
27
+ #### This Model
28
+ This is the chat model finetuned on top of [PY007/TinyLlama-1.1B-intermediate-step-480k-1T](https://huggingface.co/PY007/TinyLlama-1.1B-intermediate-step-480k-1T).
29
+ The dataset used is [OpenAssistant/oasst_top1_2023-08-25](https://huggingface.co/datasets/OpenAssistant/oasst_top1_2023-08-25) following the [chatml](https://github.com/openai/openai-python/blob/main/chatml.md) format.
30
+ #### How to use
31
+ You will need the transformers>=4.31
32
+ Do check the [TinyLlama](https://github.com/jzhang38/TinyLlama) github page for more information.
33
+ ```
34
+ from transformers import AutoTokenizer
35
+ import transformers
36
+ import torch
37
+ model = "PY007/TinyLlama-1.1B-Chat-v0.3"
38
+ tokenizer = AutoTokenizer.from_pretrained(model)
39
+ pipeline = transformers.pipeline(
40
+ "text-generation",
41
+ model=model,
42
+ torch_dtype=torch.float16,
43
+ device_map="auto",
44
+ )
45
+
46
+ prompt = "How to get in a good university?"
47
+ formatted_prompt = (
48
+ f"<|im_start|>user\n{prompt}<|im_end|>\n<|im_start|>assistant\n"
49
+ )
50
+
51
+
52
+ sequences = pipeline(
53
+ formatted_prompt,
54
+ do_sample=True,
55
+ top_k=50,
56
+ top_p = 0.9,
57
+ num_return_sequences=1,
58
+ repetition_penalty=1.1,
59
+ max_new_tokens=1024,
60
+ )
61
+ for seq in sequences:
62
+ print(f"Result: {seq['generated_text']}")
63
+ ```