Instructions to use nathanrchn/phi with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use nathanrchn/phi with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="nathanrchn/phi", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("nathanrchn/phi", trust_remote_code=True) model = AutoModelForCausalLM.from_pretrained("nathanrchn/phi", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use nathanrchn/phi with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "nathanrchn/phi" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "nathanrchn/phi", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/nathanrchn/phi
- SGLang
How to use nathanrchn/phi 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 "nathanrchn/phi" \ --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": "nathanrchn/phi", "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 "nathanrchn/phi" \ --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": "nathanrchn/phi", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use nathanrchn/phi with Docker Model Runner:
docker model run hf.co/nathanrchn/phi
Commit History
-
Upload pytorch_model.bin with huggingface_hub
7034eb1 -
Delete pytorch_model.bin
f5fae5e -
Upload pytorch_model.bin with huggingface_hub
75f6e26 -
Delete pytorch_model.bin
e6ae1b8 -
Update modeling_phi.py
15f8807 -
Upload pytorch_model.bin with huggingface_hub
0f0156b -
Delete pytorch_model.bin
2029e60 -
Upload pytorch_model.bin with huggingface_hub
65463e9
-
Delete pytorch_model_mse.bin
8149fa3 -
Delete pytorch_model.bin
a9e2b32 -
Upload pytorch_model.bin with huggingface_hub
3598930 -
Rename pytorch_model.bin to pytorch_model_mse.bin
8b12855 -
Upload pytorch_model.bin with huggingface_hub
e24ff74
-
Delete pytorch_model.bin
de3812a
-
Upload pytorch_model.bin with huggingface_hub
2de3224 -
Delete pytorch_model.bin
b172929
-
Upload pytorch_model.bin with huggingface_hub
1606ed7 -
Delete pytorch_model.bin
20fb2ea
-
Update config.json
8fd3a79 -
Upload pytorch_model.bin with huggingface_hub
4846d73 -
Delete pytorch_model.bin
854be2e -
Upload pytorch_model.bin with huggingface_hub
13d5422 -
Delete pytorch_model.bin
e66af76
-
Update config.json
0c3baaa -
Update config.json
fa6ed62 -
Upload pytorch_model.bin with huggingface_hub
fed748f -
Delete pytorch_model.bin
d9311a6
-
Upload pytorch_model.bin with huggingface_hub
ba618f3 -
Delete pytorch_model.bin
60b2090 -
Upload pytorch_model.bin with huggingface_hub
9f4feb0 -
Delete pytorch_model.bin
4f94c68 -
Upload pytorch_model.bin with huggingface_hub
c90a026 -
Delete pytorch_model.bin
7f686f1 -
Upload pytorch_model.bin with huggingface_hub
a1e7e6d -
Delete pytorch_model.bin
291cd8d -
Upload pytorch_model.bin with huggingface_hub
7e2e3a8 -
Delete pytorch_model.bin
99e3aac
-
Rename flax_model.bin to pytorch_model.bin
6625f75 -
Upload flax_model.bin
58c4219 -
Delete pytorch_model.bin
a187539 -
Update modeling_phi.py
6ff9d97 -
Update modeling_phi.py
25dd881 -
Update modeling_phi.py
2fc0ee1 -
Update modeling_phi.py
695bee3
-
Upload pytorch_model.bin
6ac85d6 -
Delete pytorch_model.bin
a241f28 -
Upload pytorch_model.bin
bb1ab71 -
Upload 10 files
0d5d7f1 -
Upload Research License.docx
217fc2f -
Delete LICENSE
d6086f9