Instructions to use advy/phi2-career-guidance with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use advy/phi2-career-guidance with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("microsoft/phi-2") model = PeftModel.from_pretrained(base_model, "advy/phi2-career-guidance") - Transformers
How to use advy/phi2-career-guidance with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="advy/phi2-career-guidance")# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("advy/phi2-career-guidance", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use advy/phi2-career-guidance with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "advy/phi2-career-guidance" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "advy/phi2-career-guidance", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/advy/phi2-career-guidance
- SGLang
How to use advy/phi2-career-guidance 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 "advy/phi2-career-guidance" \ --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": "advy/phi2-career-guidance", "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 "advy/phi2-career-guidance" \ --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": "advy/phi2-career-guidance", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use advy/phi2-career-guidance with Docker Model Runner:
docker model run hf.co/advy/phi2-career-guidance
Commit History
-
Finetune on Career Guidance QA - eval_loss: 1.0212
Verified signature679e229 -
Model save
Verified signaturee762dbf -
Training in progress, step 1288, checkpoint
Verified signature73662ff -
Training in progress, step 1288
Verified signature528d0af -
Training in progress, step 1200, checkpoint
Verified signature5fc73ff -
Training in progress, step 1200
Verified signature888a0ba -
Training in progress, step 1000, checkpoint
Verified signature64fe4ae -
Training in progress, step 1000
Verified signature3c9a62b -
Training in progress, step 800, checkpoint
Verified signatureb0a0fae -
Training in progress, step 800
Verified signature33bbe8e -
Training in progress, step 600, checkpoint
Verified signature571c28b -
Training in progress, step 600
Verified signature757097d -
Training in progress, step 400, checkpoint
Verified signature4846237 -
Training in progress, step 400
Verified signature601dde2 -
Training in progress, step 200, checkpoint
Verified signature98145f9 -
Training in progress, step 200
Verified signature56a4918 -
initial commit
Verified signaturee48cfd1