GGUF
English
RonanMcGovern commited on
Commit
d23d2c5
•
1 Parent(s): e3953b0

add readme

Browse files
Files changed (1) hide show
  1. README.md +62 -0
README.md ADDED
@@ -0,0 +1,62 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ ---
10
+
11
+ # GGUF Quantized version of TinyLlama on Sept 27th 2023
12
+
13
+ The model is not completed training yet, but still performs well.
14
+
15
+ This GGUF model is for inference with Llama.cpp
16
+
17
+ Original repo details below, from [here](https://huggingface.co/PY007/TinyLlama-1.1B-Chat-v0.2/)
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
+ 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.
27
+
28
+ #### This Model
29
+ 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/oasst_top1_2023-08-25](https://huggingface.co/datasets/OpenAssistant/oasst_top1_2023-08-25).
30
+
31
+ **Update from V0.1: 1. Different dataset. 2. Different chat format (now [chatml](https://github.com/openai/openai-python/blob/main/chatml.md) formatted conversations).**
32
+ #### How to use
33
+ You will need the transformers>=4.31
34
+ Do check the [TinyLlama](https://github.com/jzhang38/TinyLlama) github page for more information.
35
+ ```
36
+ from transformers import AutoTokenizer
37
+ import transformers
38
+ import torch
39
+ model = "PY007/TinyLlama-1.1B-Chat-v0.2"
40
+ tokenizer = AutoTokenizer.from_pretrained(model)
41
+ pipeline = transformers.pipeline(
42
+ "text-generation",
43
+ model=model,
44
+ torch_dtype=torch.float16,
45
+ device_map="auto",
46
+ )
47
+ prompt = "How to get in a good university?"
48
+ formatted_prompt = (
49
+ f"<|im_start|>user\n{prompt}<|im_end|>\n<|im_start|>assistant\n"
50
+ )
51
+ sequences = pipeline(
52
+ formatted_prompt,
53
+ do_sample=True,
54
+ top_k=50,
55
+ top_p = 0.9,
56
+ num_return_sequences=1,
57
+ repetition_penalty=1.1,
58
+ max_new_tokens=1024,
59
+ )
60
+ for seq in sequences:
61
+ print(f"Result: {seq['generated_text']}")
62
+ ```