Instructions to use aegon-h/phi-base_model with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use aegon-h/phi-base_model with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="aegon-h/phi-base_model", trust_remote_code=True)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("aegon-h/phi-base_model", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use aegon-h/phi-base_model with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "aegon-h/phi-base_model" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "aegon-h/phi-base_model", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/aegon-h/phi-base_model
- SGLang
How to use aegon-h/phi-base_model 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 "aegon-h/phi-base_model" \ --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": "aegon-h/phi-base_model", "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 "aegon-h/phi-base_model" \ --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": "aegon-h/phi-base_model", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use aegon-h/phi-base_model with Docker Model Runner:
docker model run hf.co/aegon-h/phi-base_model
Agon H commited on
Commit ·
8265ece
1
Parent(s): 66fd5bb
Upload README.md
Browse files
README.md
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: other
|
| 3 |
+
language:
|
| 4 |
+
- en
|
| 5 |
+
pipeline_tag: text-generation
|
| 6 |
+
model_creator: microsoft
|
| 7 |
+
model_link: https://huggingface.co/microsoft/phi-1_5
|
| 8 |
+
model_name: phi-1_5
|
| 9 |
+
edited_by: agonh
|
| 10 |
+
tags:
|
| 11 |
+
- microsoft
|
| 12 |
+
- phi
|
| 13 |
+
---
|
| 14 |
+
# Phi-base_model
|
| 15 |
+
- Model creator: [Microsoft](https://huggingface.co/microsoft)
|
| 16 |
+
- Original model: [phi-1_5](https://huggingface.co/microsoft/phi-1_5)
|
| 17 |
+
|
| 18 |
+
|
| 19 |
+
## Description
|
| 20 |
+
|
| 21 |
+
This repo contains files for [microsoft's phi-1_5](https://huggingface.co/microsoft/phi-1_5).
|
| 22 |
+
|
| 23 |
+
### License
|
| 24 |
+
The model is licensed under the "Research License"
|