Instructions to use ZahrizhalAli/phi-1_5-code-generation with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ZahrizhalAli/phi-1_5-code-generation with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="ZahrizhalAli/phi-1_5-code-generation")# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("ZahrizhalAli/phi-1_5-code-generation", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use ZahrizhalAli/phi-1_5-code-generation with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ZahrizhalAli/phi-1_5-code-generation" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ZahrizhalAli/phi-1_5-code-generation", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/ZahrizhalAli/phi-1_5-code-generation
- SGLang
How to use ZahrizhalAli/phi-1_5-code-generation 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 "ZahrizhalAli/phi-1_5-code-generation" \ --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": "ZahrizhalAli/phi-1_5-code-generation", "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 "ZahrizhalAli/phi-1_5-code-generation" \ --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": "ZahrizhalAli/phi-1_5-code-generation", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use ZahrizhalAli/phi-1_5-code-generation with Docker Model Runner:
docker model run hf.co/ZahrizhalAli/phi-1_5-code-generation
Commit History
-
Create README.md
cc7cf15
-
Training in progress, step 400
55dacbc -
Training in progress, step 390
6011931 -
Training in progress, step 380
7b450d7 -
Training in progress, step 370
17c2e6b -
Training in progress, step 360
149c9d6 -
Training in progress, step 350
0746bb1 -
Training in progress, step 340
0f8a2e7 -
Training in progress, step 330
325a1b7 -
Training in progress, step 320
7572242 -
Training in progress, step 310
aa78d6b -
Training in progress, step 300
88b831e -
Training in progress, step 290
ebbce99 -
Training in progress, step 280
1d390b5 -
Training in progress, step 270
87e1358 -
Training in progress, step 260
d745d0e -
Training in progress, step 250
9d828cd -
Training in progress, step 240
ea73c39 -
Training in progress, step 230
8a5230e -
Training in progress, step 220
613f1d5 -
Training in progress, step 210
c55eeb9 -
Training in progress, step 200
998606c -
Training in progress, step 190
c7019a8 -
Training in progress, step 180
d5b2b29 -
Training in progress, step 170
e4d2057 -
Training in progress, step 160
f806f53 -
Training in progress, step 150
77788ba -
Training in progress, step 140
42bba56 -
Training in progress, step 130
34257bf -
Training in progress, step 120
f0ddbaa -
Training in progress, step 110
a542ef0 -
Training in progress, step 100
847aa9b -
Training in progress, step 90
fe149f2 -
Training in progress, step 80
34725db -
Training in progress, step 70
d707d41 -
Training in progress, step 60
36168ca -
Training in progress, step 50
a5efd5f -
Training in progress, step 40
1acfaaa -
Training in progress, step 30
3933c09 -
Training in progress, step 20
5bff8a1 -
Training in progress, step 10
1a2e9cf -
initial commit
a6e185f