Menouar commited on
Commit
0012339
1 Parent(s): 2134985

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +24 -3
README.md CHANGED
@@ -15,14 +15,35 @@ metrics:
15
  - accuracy
16
  ---
17
 
18
-
19
  # phi-2-basic-maths
20
 
21
  This model is a fine-tuned version of [microsoft/phi-2](https://huggingface.co/microsoft/phi-2) on an [GSM8K dataset](https://huggingface.co/datasets/gsm8k).
22
 
23
- ## Model description
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
24
 
25
- More information needed
 
26
 
27
  ## Training procedure
28
 
 
15
  - accuracy
16
  ---
17
 
 
18
  # phi-2-basic-maths
19
 
20
  This model is a fine-tuned version of [microsoft/phi-2](https://huggingface.co/microsoft/phi-2) on an [GSM8K dataset](https://huggingface.co/datasets/gsm8k).
21
 
22
+ ## Model Description
23
+
24
+ The objective of this model is to evaluate Phi-2's ability to provide correct solutions to reasoning problems after fine-tuning. This model was trained using techniques such as TRL, LoRA quantization, and Flash Attention.
25
+
26
+ To test it, you can use the following code:
27
+
28
+ ```python
29
+ import torch
30
+ from peft import AutoPeftModelForCausalLM
31
+ from transformers import AutoTokenizer, pipeline
32
+
33
+ # Specify the model ID
34
+ peft_model_id = "Menouar/phi-2-basic-maths"
35
+
36
+ # Load Model with PEFT adapter
37
+ model = AutoPeftModelForCausalLM.from_pretrained(
38
+ peft_model_id,
39
+ device_map="auto",
40
+ torch_dtype=torch.float16
41
+ )
42
+
43
+ tokenizer = AutoTokenizer.from_pretrained(peft_model_id)
44
 
45
+ pipe = pipeline("text-generation", model=model, tokenizer=tokenizer)
46
+ ```
47
 
48
  ## Training procedure
49