sd-inf commited on
Commit
e281507
·
verified ·
1 Parent(s): b556045

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +56 -3
README.md CHANGED
@@ -1,3 +1,56 @@
1
- ---
2
- license: apache-2.0
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ language:
4
+ - en
5
+ pipeline_tag: text-generation
6
+ library_name: transformers
7
+ ---
8
+
9
+
10
+
11
+ # Pico Mini V1
12
+
13
+ Pico v1 is a work in progress model. Based off Qwen 2.5 .5b model, it has been fine tuned for automatic COT and self reflection.
14
+
15
+ When making a output, Pico will create three sections, a reasoning section, a self-reflection section and a output section.
16
+
17
+ Pico Mini v1 struggles with non-question related tasks (Small talk, roleplay, etc).
18
+
19
+ Pico Mini v1 can struggle with staying on topic at times.
20
+
21
+ Here is a example of how you can use it:
22
+
23
+ ```from transformers import AutoModelForCausalLM, AutoTokenizer
24
+ import torch
25
+
26
+ # Load the model and tokenizer from the Hugging Face Model Hub (test/test repository)
27
+ output_dir = "test/test"
28
+ device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
29
+
30
+ print("Loading the model and tokenizer from the Hugging Face Hub...")
31
+ model = AutoModelForCausalLM.from_pretrained(output_dir).to(device) # Ensure model is on the same device
32
+ tokenizer = AutoTokenizer.from_pretrained(output_dir)
33
+
34
+ # Define the testing prompt
35
+ prompt = "What color is the sky?"
36
+ print(f"Testing prompt: {prompt}")
37
+
38
+ # Tokenize input and move to the same device as the model
39
+ inputs = tokenizer(prompt, return_tensors="pt").to(device) # Ensure inputs are on the same device
40
+
41
+ # Generate response
42
+ print("Generating response...")
43
+ outputs = model.generate(
44
+ **inputs,
45
+ max_new_tokens=1550, # Adjust the max tokens if needed
46
+ temperature=0.5, # Adjust for response randomness
47
+ top_k=50, # Adjust for top-k sampling
48
+ top_p=0.9 # Adjust for nucleus sampling
49
+ )
50
+
51
+ # Decode and print the response
52
+ response = tokenizer.decode(outputs[0], skip_special_tokens=True)
53
+ print("Generated response:")
54
+ print(response)
55
+
56
+ ```