Instructions to use llmware/phi-3-ov with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use llmware/phi-3-ov with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="llmware/phi-3-ov", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("llmware/phi-3-ov", trust_remote_code=True) model = AutoModelForCausalLM.from_pretrained("llmware/phi-3-ov", trust_remote_code=True, device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use llmware/phi-3-ov with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "llmware/phi-3-ov" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "llmware/phi-3-ov", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/llmware/phi-3-ov
- SGLang
How to use llmware/phi-3-ov 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 "llmware/phi-3-ov" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "llmware/phi-3-ov", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "llmware/phi-3-ov" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "llmware/phi-3-ov", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use llmware/phi-3-ov with Docker Model Runner:
docker model run hf.co/llmware/phi-3-ov
Commit History
-
Update README.md
Verified signaturefe30542
-
Update README.md
Verified signatureaa852f0 -
Update README.md
Verified signature78f992c -
Update config.json
Verified signature40f05dc -
Update README.md
Verified signature31b7e3a -
Update README.md
Verified signatureac608a8
-
Upload hash_record_sha256.json
Verified signature1bc4c5e
-
Update config.json
Verified signatured095234
-
Update README.md
Verified signature4e6561c -
Update README.md
Verified signature8c1781f -
Upload LICENSE.txt
Verified signature5cc6159 -
Upload README.md
Verified signature2692e8b -
Update config.json
Verified signature9652ec8 -
Update config.json
Verified signature6d51e84 -
Update config.json
Verified signaturee158e02 -
Update config.json
Verified signature37356f6
-
Upload openvino_model.bin
Verified signatureded4220 -
Upload 12 files
Verified signature9fc0d36 -
initial commit
Verified signature66cece7