GGUF
English
tinyllama
RonanMcGovern commited on
Commit
3a14569
•
1 Parent(s): 51da3d1

commit model card

Browse files
Files changed (1) hide show
  1. README.md +65 -0
README.md CHANGED
@@ -1,3 +1,68 @@
1
  ---
2
  license: apache-2.0
 
 
 
 
 
 
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  license: apache-2.0
3
+ datasets:
4
+ - cerebras/SlimPajama-627B
5
+ - bigcode/starcoderdata
6
+ - timdettmers/openassistant-guanaco
7
+ language:
8
+ - en
9
+ tags:
10
+ - tinyllama
11
+ - gguf
12
  ---
13
+ <div align="center">
14
+
15
+ # GGUF Quantized version of TinyLlama at the 250-500k checkpoint
16
+
17
+ Original model card below from [this repo](https://huggingface.co/PY007/TinyLlama-1.1B-Chat-v0.1).
18
+
19
+ # TinyLlama-1.1B
20
+ </div>
21
+
22
+ https://github.com/jzhang38/TinyLlama
23
+
24
+ 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.
25
+
26
+ <div align="center">
27
+ <img src="./TinyLlama_logo.png" width="300"/>
28
+ </div>
29
+
30
+ 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.
31
+
32
+ #### This Model
33
+ This is the chat model finetuned on [PY007/TinyLlama-1.1B-intermediate-step-240k-503b](https://huggingface.co/PY007/TinyLlama-1.1B-intermediate-step-240k-503b). The dataset used is [openassistant-guananco](https://huggingface.co/datasets/timdettmers/openassistant-guanaco).
34
+
35
+ #### How to use
36
+ You will need the transformers>=4.31
37
+ Do check the [TinyLlama](https://github.com/jzhang38/TinyLlama) github page for more information.
38
+ ```python
39
+ from transformers import AutoTokenizer
40
+ import transformers
41
+ import torch
42
+ model = "PY007/TinyLlama-1.1B-Chat-v0.1"
43
+ tokenizer = AutoTokenizer.from_pretrained(model)
44
+ pipeline = transformers.pipeline(
45
+ "text-generation",
46
+ model=model,
47
+ torch_dtype=torch.float16,
48
+ device_map="auto",
49
+ )
50
+
51
+ prompt = "What are the values in open source projects?"
52
+ formatted_prompt = (
53
+ f"### Human: {prompt}### Assistant:"
54
+ )
55
+
56
+
57
+ sequences = pipeline(
58
+ formatted_prompt,
59
+ do_sample=True,
60
+ top_k=50,
61
+ top_p = 0.7,
62
+ num_return_sequences=1,
63
+ repetition_penalty=1.1,
64
+ max_new_tokens=500,
65
+ )
66
+ for seq in sequences:
67
+ print(f"Result: {seq['generated_text']}")
68
+ ```