samzheng commited on
Commit
c911d26
·
verified ·
1 Parent(s): d43bd69

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +44 -4
README.md CHANGED
@@ -1,5 +1,45 @@
1
- ---
2
- license: apache-2.0
 
 
 
 
 
 
 
 
 
 
3
  base_model:
4
- - mistralai/Mistral-7B-Instruct-v0.3
5
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ base_model:
4
+ - mistralai/Mistral-7B-Instruct-v0.3
5
+ datasets:
6
+ - samzheng/SymbolicCode-CoT
7
+ language:
8
+ - en
9
+ pipeline_tag: question-answering
10
+ ---
11
+ model_name: "Mistral-7B-Math (Merged FP16 Checkpoint)" \
12
+ repo: "samzheng/mistral-7b-math-merged"\
13
  base_model:
14
+ name: "unsloth/mistral-7b-instruct-v0.3-bnb-4bit"
15
+ url: "https://huggingface.co/unsloth/mistral-7b-instruct-v0.3-bnb-4bit"\
16
+ task: "Grade-school symbolic math word problems → Python code answers"\
17
+ fine_tuning:
18
+ method: "LoRA adapters (r=16, α=16, dropout=0) merged into the base weights, FP16 precision"
19
+ parameters:
20
+ r: 16
21
+ alpha: 16
22
+ dropout: 0\
23
+ dataset:
24
+ description: "6.7k Alpaca-formatted Q/A pairs with chain-of-thought + code"
25
+ splits:
26
+ - "symboliccode_cot_train"
27
+ - "symboliccode_cot_validation"\
28
+ language: python \
29
+ code:
30
+
31
+ from transformers import AutoModelForCausalLM, AutoTokenizer
32
+ model = AutoModelForCausalLM.from_pretrained(
33
+ "samzheng/mistral-7b-math-merged",
34
+ torch_dtype="auto", device_map="auto"
35
+ )
36
+ tok = AutoTokenizer.from_pretrained("samzheng/mistral-7b-math-merged")
37
+
38
+ prompt = """Below is an instruction that describes a task...
39
+ ### Instruction: Solve the problem using step-by-step reasoning and provide Python code.
40
+
41
+ ### Input: Solve for x: 2x + 5 = 17
42
+
43
+ ### Response:
44
+ """
45
+ print(tok.decode(model.generate(**tok(prompt, return_tensors="pt").to(model.device),max_new_tokens=256)[0], skip_special_tokens=True))