Instructions to use Vasanth/phi-1_5-finetuned-gsm8k with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Vasanth/phi-1_5-finetuned-gsm8k with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Vasanth/phi-1_5-finetuned-gsm8k", trust_remote_code=True)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("Vasanth/phi-1_5-finetuned-gsm8k", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Vasanth/phi-1_5-finetuned-gsm8k with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Vasanth/phi-1_5-finetuned-gsm8k" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Vasanth/phi-1_5-finetuned-gsm8k", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Vasanth/phi-1_5-finetuned-gsm8k
- SGLang
How to use Vasanth/phi-1_5-finetuned-gsm8k with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "Vasanth/phi-1_5-finetuned-gsm8k" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Vasanth/phi-1_5-finetuned-gsm8k", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "Vasanth/phi-1_5-finetuned-gsm8k" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Vasanth/phi-1_5-finetuned-gsm8k", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Vasanth/phi-1_5-finetuned-gsm8k with Docker Model Runner:
docker model run hf.co/Vasanth/phi-1_5-finetuned-gsm8k
finetuning
Hi,
I have a short question .
How did you fine-tuned it ? could you please share the scripts or a link where I can find more information ?
here is the notebook he used : https://github.com/Vasanthengineer4949/NLP-Projects-NHV/tree/main/LLMs%20Related/Finetune%20Phi_1_5
and here is the video where he explain it : https://www.youtube.com/watch?v=R8CKx5yNEDo
thank you
Hi, @ahmed000000000 Just curious
mine fine tuning qlora of phi1.5 show the message of attenion_mask not supported during fine tuning
`attention_mask` is not supported during training. Using it might lead to unexpected results.
why there's no this kind of message in our ipynb ??
secondly, if they do not support attention_mask, when we set
tokenizer.pad_token = tokenizer.eos_token
do we need to change the padding_side.
I mean, if padding_side = 'left'as some other tutorial suggestion,
the input_ids will become EOS EOS EOS EOS EOS Below is the instruction, blab la bla bla.....
the model will be trained on predicting a lot of EOS token in the beginning of sentence. wouldn't that somewhat weird ?