Instructions to use ulkaa/phi-2-OpenVINO-fp16 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ulkaa/phi-2-OpenVINO-fp16 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="ulkaa/phi-2-OpenVINO-fp16")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("ulkaa/phi-2-OpenVINO-fp16") model = AutoModelForCausalLM.from_pretrained("ulkaa/phi-2-OpenVINO-fp16", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use ulkaa/phi-2-OpenVINO-fp16 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ulkaa/phi-2-OpenVINO-fp16" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ulkaa/phi-2-OpenVINO-fp16", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/ulkaa/phi-2-OpenVINO-fp16
- SGLang
How to use ulkaa/phi-2-OpenVINO-fp16 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 "ulkaa/phi-2-OpenVINO-fp16" \ --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": "ulkaa/phi-2-OpenVINO-fp16", "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 "ulkaa/phi-2-OpenVINO-fp16" \ --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": "ulkaa/phi-2-OpenVINO-fp16", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use ulkaa/phi-2-OpenVINO-fp16 with Docker Model Runner:
docker model run hf.co/ulkaa/phi-2-OpenVINO-fp16
Commit History
-
Upload vocab.json with huggingface_hub
Verified signature5af9f40 -
Upload merges.txt with huggingface_hub
Verified signature5413ea6 -
Upload added_tokens.json with huggingface_hub
Verified signature64c2950 -
Upload openvino_model.bin with huggingface_hub
Verified signaturec732b6c -
Upload openvino_model.xml with huggingface_hub
Verified signature99356cb -
Upload .gitattributes with huggingface_hub
Verified signatureb42d733 -
Upload tokenizer_config.json with huggingface_hub
Verified signature560c5c8 -
Upload generation_config.json with huggingface_hub
Verified signature47be94d -
Upload tokenizer.json with huggingface_hub
Verified signature8d52c8e -
Upload config.json with huggingface_hub
Verified signatureb8d740a -
Upload special_tokens_map.json with huggingface_hub
Verified signaturea9c9bca -
Upload vocab.json with huggingface_hub
Verified signature0fe1186 -
Upload tokenizer_config.json with huggingface_hub
Verified signature05ead3a -
Upload tokenizer.json with huggingface_hub
Verified signatureaf7b4ee -
Upload special_tokens_map.json with huggingface_hub
Verified signature245dd6f -
Upload openvino_model.xml with huggingface_hub
Verified signature243749b -
Upload openvino_model.bin with huggingface_hub
Verified signature8803999 -
Upload merges.txt with huggingface_hub
Verified signaturea40d3aa -
Upload generation_config.json with huggingface_hub
Verified signaturec7a88bc -
Upload config.json with huggingface_hub
Verified signature0fed9f8 -
Upload added_tokens.json with huggingface_hub
Verified signatureda1bedb -
initial commit
Verified signaturee97e2ee