chaoscodes commited on
Commit
df87ba8
•
1 Parent(s): f67f7cf

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +56 -0
README.md CHANGED
@@ -1,3 +1,59 @@
1
  ---
2
  license: apache-2.0
 
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  license: apache-2.0
3
+ datasets:
4
+ - cerebras/SlimPajama-627B
5
+ language:
6
+ - en
7
  ---
8
+ <div align="center">
9
+
10
+ # TinyLlama-1.1B-v2
11
+ </div>
12
+
13
+ https://github.com/jzhang38/TinyLlama
14
+
15
+
16
+ <div align="center">
17
+ <img src="https://huggingface.co/PY007/TinyLlama-1.1B-intermediate-step-240k-503b/resolve/main/TinyLlama_logo.png" width="300"/>
18
+ </div>
19
+
20
+ 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.
21
+
22
+ #### This Model
23
+ In this repo, we release our TinyLlama training only with 2T tokens on SlimPajama dataset. (~3 epochs)
24
+
25
+ #### How to use
26
+ You will need the transformers>=4.31
27
+ Do check the [TinyLlama](https://github.com/jzhang38/TinyLlama) github page for more information.
28
+ ```
29
+ from transformers import AutoTokenizer
30
+ import transformers
31
+ import torch
32
+ model = "TinyLlama/TinyLlama_v2"
33
+ tokenizer = AutoTokenizer.from_pretrained(model)
34
+ pipeline = transformers.pipeline(
35
+ "text-generation",
36
+ model=model,
37
+ torch_dtype=torch.float16,
38
+ device_map="auto",
39
+ )
40
+
41
+ sequences = pipeline(
42
+ '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.',
43
+ do_sample=True,
44
+ top_k=10,
45
+ num_return_sequences=1,
46
+ repetition_penalty=1.5,
47
+ eos_token_id=tokenizer.eos_token_id,
48
+ max_length=500,
49
+ )
50
+ for seq in sequences:
51
+ print(f"Result: {seq['generated_text']}")
52
+ ```
53
+
54
+ #### Eval
55
+ | Model | Pretrain Tokens | HellaSwag | Obqa | WinoGrande | ARC_c | ARC_e | boolq | piqa | avg |
56
+ |-------------------------------------------|-----------------|-----------|------|------------|-------|-------|-------|------|-----|
57
+ | Pythia-1.0B | 300B | 47.16 | 31.40| 53.43 | 27.05 | 48.99 | 60.83 | 69.21 | 48.30 |
58
+ | TinyLlama-1.1B-intermediate-step-1431k-3T | 3T | 59.20 | 36.00 | 59.12 | 30.12 | 55.25 | 57.83 | 73.29 | 52.99|
59
+ | TinyLlama-1.1B-v2 | 2T | **61.47** | **36.80** | **59.43** | **32.68** | **55.47** | 55.99 | **73.56** | **53.63**|