afrideva commited on
Commit
28a14aa
1 Parent(s): 5e5fffa

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +60 -0
README.md ADDED
@@ -0,0 +1,60 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model: segestic/Tinystories-gpt-0.1-3m
3
+ datasets:
4
+ - roneneldan/TinyStories
5
+ inference: true
6
+ language:
7
+ - en
8
+ library_name: transformers
9
+ model_creator: segestic
10
+ model_name: Tinystories-gpt-0.1-3m
11
+ pipeline_tag: text-generation
12
+ quantized_by: afrideva
13
+ tags:
14
+ - gguf
15
+ - ggml
16
+ - quantized
17
+ ---
18
+
19
+ # Tinystories-gpt-0.1-3m-GGUF
20
+
21
+ Quantized GGUF model files for [Tinystories-gpt-0.1-3m](https://huggingface.co/segestic/Tinystories-gpt-0.1-3m) from [segestic](https://huggingface.co/segestic)
22
+
23
+ ## Original Model Card:
24
+
25
+ ## We tried to use the huggingface transformers library to recreate the TinyStories models on Consumer GPU using GPT2 Architecture instead of GPT-Neo Architecture orignally used in the paper (https://arxiv.org/abs/2305.07759). Output model is 15mb and has 3 million parameters.
26
+
27
+
28
+
29
+ # ------ EXAMPLE USAGE 1 ---
30
+
31
+ from transformers import AutoTokenizer, AutoModelForCausalLM
32
+ tokenizer = AutoTokenizer.from_pretrained("segestic/Tinystories-gpt-0.1-3m")
33
+
34
+ model = AutoModelForCausalLM.from_pretrained("segestic/Tinystories-gpt-0.1-3m")
35
+
36
+ prompt = "Once upon a time there was"
37
+
38
+ input_ids = tokenizer.encode(prompt, return_tensors="pt")
39
+ #### Generate completion
40
+ output = model.generate(input_ids, max_length = 1000, num_beams=1)
41
+ #### Decode the completion
42
+ output_text = tokenizer.decode(output[0], skip_special_tokens=True)
43
+ #### Print the generated text
44
+ print(output_text)
45
+
46
+
47
+
48
+ # ------ EXAMPLE USAGE 2 ------
49
+ ## Use a pipeline as a high-level helper
50
+ from transformers import pipeline
51
+ #### pipeline
52
+ pipe = pipeline("text-generation", model="segestic/Tinystories-gpt-0.1-3m")
53
+ #### prompt
54
+ prompt = "where is the little girl"
55
+ #### generate completion
56
+ output = pipe(prompt, max_length=1000, num_beams=1)
57
+ #### decode the completion
58
+ generated_text = output[0]['generated_text']
59
+ #### Print the generated text
60
+ print(generated_text)