Discussion
Collection
11 items • Updated
How to use TakalaWang/Discussion-Phi-4-multimodal-instruct with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="TakalaWang/Discussion-Phi-4-multimodal-instruct", trust_remote_code=True)
messages = [
{"role": "user", "content": "Who are you?"},
]
pipe(messages) # Load model directly
from transformers import AutoModelForCausalLM
model = AutoModelForCausalLM.from_pretrained("TakalaWang/Discussion-Phi-4-multimodal-instruct", trust_remote_code=True, dtype="auto")How to use TakalaWang/Discussion-Phi-4-multimodal-instruct with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "TakalaWang/Discussion-Phi-4-multimodal-instruct"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/chat/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "TakalaWang/Discussion-Phi-4-multimodal-instruct",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'docker model run hf.co/TakalaWang/Discussion-Phi-4-multimodal-instruct
How to use TakalaWang/Discussion-Phi-4-multimodal-instruct with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "TakalaWang/Discussion-Phi-4-multimodal-instruct" \
--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": "TakalaWang/Discussion-Phi-4-multimodal-instruct",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'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 "TakalaWang/Discussion-Phi-4-multimodal-instruct" \
--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": "TakalaWang/Discussion-Phi-4-multimodal-instruct",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'How to use TakalaWang/Discussion-Phi-4-multimodal-instruct with Docker Model Runner:
docker model run hf.co/TakalaWang/Discussion-Phi-4-multimodal-instruct
This model is a fine-tuned version of microsoft/Phi-4-multimodal-instruct on an unknown dataset. It achieves the following results on the evaluation set:
More information needed
More information needed
More information needed
The following hyperparameters were used during training:
| Training Loss | Epoch | Step | Validation Loss |
|---|---|---|---|
| 1.9923 | 0.2235 | 10 | 14.2728 |
| 0.3819 | 0.4469 | 20 | 14.0122 |
| 0.249 | 0.6704 | 30 | 14.0852 |
| 0.2951 | 0.8939 | 40 | 14.0115 |
| 0.2179 | 1.1117 | 50 | 14.0154 |
| 0.2839 | 1.3352 | 60 | 13.9879 |
| 0.2388 | 1.5587 | 70 | 14.0103 |
| 0.2687 | 1.7821 | 80 | 13.9336 |
| 0.1469 | 2.0 | 90 | 13.9879 |
| 0.1891 | 2.2235 | 100 | 13.9434 |
| 0.133 | 2.4469 | 110 | 14.0584 |
| 0.1759 | 2.6704 | 120 | 13.8902 |
| 0.1613 | 2.8939 | 130 | 13.8976 |
Base model
microsoft/Phi-4-multimodal-instruct