Instructions to use ianshank/phi-35-moe-instruct with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ianshank/phi-35-moe-instruct with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="ianshank/phi-35-moe-instruct", trust_remote_code=True)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("ianshank/phi-35-moe-instruct", trust_remote_code=True) model = AutoModelForCausalLM.from_pretrained("ianshank/phi-35-moe-instruct", trust_remote_code=True) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use ianshank/phi-35-moe-instruct with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ianshank/phi-35-moe-instruct" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ianshank/phi-35-moe-instruct", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/ianshank/phi-35-moe-instruct
- SGLang
How to use ianshank/phi-35-moe-instruct 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 "ianshank/phi-35-moe-instruct" \ --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": "ianshank/phi-35-moe-instruct", "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 "ianshank/phi-35-moe-instruct" \ --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": "ianshank/phi-35-moe-instruct", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use ianshank/phi-35-moe-instruct with Docker Model Runner:
docker model run hf.co/ianshank/phi-35-moe-instruct
Ctrl+K
- 12.8 MB xet
- 6.26 MB
- 862 kB
- 1.68 MB
- 1.12 MB
- 87.5 kB
- 97.9 kB
- 2.78 kB
- 1.79 MB
- 1.57 MB
- 91.9 kB
- 1.25 MB
- 1.16 MB
- 1.43 MB
- 844 kB
- 99.1 kB
- 119 MB xet
- 943 kB
- 87.5 kB
- 2.73 MB
- 836 kB
- 92.3 kB
- 94.7 kB
- 1.11 MB
- 2.17 MB
- 11.4 MB xet
- 971 kB
- 1.71 MB
- 2.9 MB
- 81.9 kB
- 83.6 kB
- 0 Bytes
- 1.01 MB
- 2 MB
- 14.3 MB xet
- 6.74 MB
- 292 Bytes
- 1.61 MB
- 1.3 MB
- 4.92 MB
- 3.26 MB
- 1.08 MB
- 895 kB
- 1.73 MB
- 3.92 MB
- 371 kB
- 1.15 MB
- 1.01 MB
- 931 kB
- 702 kB