Text Generation
Transformers
English
Hindi
text-generation-inference
unsloth
trl
llama
conversational
Instructions to use Threatthriver/phi4-finetuned-16bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Threatthriver/phi4-finetuned-16bit with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Threatthriver/phi4-finetuned-16bit") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("Threatthriver/phi4-finetuned-16bit", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Threatthriver/phi4-finetuned-16bit with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Threatthriver/phi4-finetuned-16bit" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Threatthriver/phi4-finetuned-16bit", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Threatthriver/phi4-finetuned-16bit
- SGLang
How to use Threatthriver/phi4-finetuned-16bit 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 "Threatthriver/phi4-finetuned-16bit" \ --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": "Threatthriver/phi4-finetuned-16bit", "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 "Threatthriver/phi4-finetuned-16bit" \ --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": "Threatthriver/phi4-finetuned-16bit", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Unsloth Desktop
- Docker Model Runner
How to use Threatthriver/phi4-finetuned-16bit with Docker Model Runner:
docker model run hf.co/Threatthriver/phi4-finetuned-16bit
Update README.md
Browse files
README.md
CHANGED
|
@@ -25,7 +25,7 @@ language:
|
|
| 25 |
|
| 26 |
**Model Description:**
|
| 27 |
|
| 28 |
-
This
|
| 29 |
|
| 30 |
**Intended Use:**
|
| 31 |
|
|
|
|
| 25 |
|
| 26 |
**Model Description:**
|
| 27 |
|
| 28 |
+
This PHI-4 model, named Threatthriver/phi4-finetuned-16bit, was fine-tuned by Threatthriver, potentially for applications in cybersecurity, threat intelligence, or related domains. It was trained using Unsloth (https://github.com/unslothai/unsloth) and Hugging Face's TRL library, which allowed for a 2x faster training process. The model is based on the unsloth/phi-4-unsloth-bnb-4bit base model. It was fine-tuned and saved in 16-bit precision.
|
| 29 |
|
| 30 |
**Intended Use:**
|
| 31 |
|