RichardErkhov commited on
Commit
25c3e96
β€’
1 Parent(s): 4b86078

uploaded readme

Browse files
Files changed (1) hide show
  1. README.md +73 -0
README.md ADDED
@@ -0,0 +1,73 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Quantization made by Richard Erkhov.
2
+
3
+ [Github](https://github.com/RichardErkhov)
4
+
5
+ [Discord](https://discord.gg/pvy7H8DZMG)
6
+
7
+ [Request more models](https://github.com/RichardErkhov/quant_request)
8
+
9
+
10
+ TinyLlama-1.1B-intermediate-step-480k-1T - bnb 4bits
11
+ - Model creator: https://huggingface.co/TinyLlama/
12
+ - Original model: https://huggingface.co/TinyLlama/TinyLlama-1.1B-intermediate-step-480k-1T/
13
+
14
+
15
+
16
+
17
+ Original model description:
18
+ ---
19
+ license: apache-2.0
20
+ datasets:
21
+ - cerebras/SlimPajama-627B
22
+ - bigcode/starcoderdata
23
+ language:
24
+ - en
25
+ ---
26
+ <div align="center">
27
+
28
+ # TinyLlama-1.1B
29
+ </div>
30
+
31
+ https://github.com/jzhang38/TinyLlama
32
+
33
+ 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.
34
+
35
+ <div align="center">
36
+ <img src="./TinyLlama_logo.png" width="300"/>
37
+ </div>
38
+
39
+ 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.
40
+
41
+ #### This Model
42
+ This is an intermediate checkpoint with 480K steps and 1007B tokens.
43
+
44
+
45
+ #### How to use
46
+ You will need the transformers>=4.31
47
+ Do check the [TinyLlama](https://github.com/jzhang38/TinyLlama) github page for more information.
48
+ ```python
49
+ from transformers import AutoTokenizer
50
+ import transformers
51
+ import torch
52
+ model = "PY007/TinyLlama-1.1B-intermediate-step-240k-503b"
53
+ tokenizer = AutoTokenizer.from_pretrained(model)
54
+ pipeline = transformers.pipeline(
55
+ "text-generation",
56
+ model=model,
57
+ torch_dtype=torch.float16,
58
+ device_map="auto",
59
+ )
60
+
61
+ sequences = pipeline(
62
+ '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.',
63
+ do_sample=True,
64
+ top_k=10,
65
+ num_return_sequences=1,
66
+ repetition_penalty=1.5,
67
+ eos_token_id=tokenizer.eos_token_id,
68
+ max_length=500,
69
+ )
70
+ for seq in sequences:
71
+ print(f"Result: {seq['generated_text']}")
72
+ ```
73
+