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.
To test it, you can use the following code:
import torch
from peft import AutoPeftModelForCausalLM
from transformers import AutoTokenizer, pipeline
# Specify the model ID
peft_model_id = "Menouar/phi-2-basic-maths"# Load Model with PEFT adapter
model = AutoPeftModelForCausalLM.from_pretrained(
peft_model_id,
device_map="auto",
torch_dtype=torch.float16
)
tokenizer = AutoTokenizer.from_pretrained(peft_model_id)
pipe = pipeline("text-generation", model=model, tokenizer=tokenizer)
Training procedure
The complete training procedure can be found on my
Notebook
.
Training hyperparameters
The following hyperparameters were used during training:
learning_rate: 0.0002
train_batch_size: 42
eval_batch_size: 8
seed: 42
gradient_accumulation_steps: 2
total_train_batch_size: 84
optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
phi-2-basic-maths huggingface.co is an AI model on huggingface.co that provides phi-2-basic-maths's model effect (), which can be used instantly with this Menouar phi-2-basic-maths model. huggingface.co supports a free trial of the phi-2-basic-maths model, and also provides paid use of the phi-2-basic-maths. Support call phi-2-basic-maths model through api, including Node.js, Python, http.
phi-2-basic-maths huggingface.co is an online trial and call api platform, which integrates phi-2-basic-maths's modeling effects, including api services, and provides a free online trial of phi-2-basic-maths, you can try phi-2-basic-maths online for free by clicking the link below.
Menouar phi-2-basic-maths online free url in huggingface.co:
phi-2-basic-maths is an open source model from GitHub that offers a free installation service, and any user can find phi-2-basic-maths on GitHub to install. At the same time, huggingface.co provides the effect of phi-2-basic-maths install, users can directly use phi-2-basic-maths installed effect in huggingface.co for debugging and trial. It also supports api for free installation.