DataPilot/Zero_SFT_Ja_v3.5
Viewer • Updated • 108k • 74 • 5
How to use Holy-fox/Qwen3.5-0.8B-JP with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="Holy-fox/Qwen3.5-0.8B-JP")
messages = [
{
"role": "user",
"content": [
{"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"},
{"type": "text", "text": "What animal is on the candy?"}
]
},
]
pipe(text=messages) # Load model directly
from transformers import AutoProcessor, AutoModelForMultimodalLM
processor = AutoProcessor.from_pretrained("Holy-fox/Qwen3.5-0.8B-JP")
model = AutoModelForMultimodalLM.from_pretrained("Holy-fox/Qwen3.5-0.8B-JP", device_map="auto")
messages = [
{
"role": "user",
"content": [
{"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"},
{"type": "text", "text": "What animal is on the candy?"}
]
},
]
inputs = processor.apply_chat_template(
messages,
add_generation_prompt=True,
tokenize=True,
return_dict=True,
return_tensors="pt",
).to(model.device)
outputs = model.generate(**inputs, max_new_tokens=40)
print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:]))How to use Holy-fox/Qwen3.5-0.8B-JP with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "Holy-fox/Qwen3.5-0.8B-JP"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/chat/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "Holy-fox/Qwen3.5-0.8B-JP",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'docker model run hf.co/Holy-fox/Qwen3.5-0.8B-JP
How to use Holy-fox/Qwen3.5-0.8B-JP with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "Holy-fox/Qwen3.5-0.8B-JP" \
--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": "Holy-fox/Qwen3.5-0.8B-JP",
"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 "Holy-fox/Qwen3.5-0.8B-JP" \
--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": "Holy-fox/Qwen3.5-0.8B-JP",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'How to use Holy-fox/Qwen3.5-0.8B-JP with Docker Model Runner:
docker model run hf.co/Holy-fox/Qwen3.5-0.8B-JP
Qwen/Qwen3.5-0.8B を日本語インストラクションデータでファインチューニングしたモデルです。
本モデルは、Qwen3.5-0.8B をベースに、DataPilot/Zero_SFT_Ja_v3.5(108k件)を用いて日本語 SFT を施したものです。Qwen3 系が持つ thinking モードは使用せず、Non-thinking(直接応答)モードのみで動作します。
| 項目 | 詳細 |
|---|---|
| ベースモデル | Qwen/Qwen3.5-0.8B |
| パラメータ数 | 0.8B |
| 学習データ | DataPilot/Zero_SFT_Ja_v3.5(108k件) |
| 学習フレームワーク | Unsloth |
| 学習ハードウェア | NVIDIA RTX 5090 |
| 対応言語 | 日本語(主) |
| ライセンス | Apache 2.0 |
pip install "transformers[serving] @ git+https://github.com/huggingface/transformers.git@main"
transformers serve --force-model Holy-fox/Qwen3.5-0.8B-JP --port 8000
pip install -U openai
export OPENAI_BASE_URL="http://localhost:8000/v1"
export OPENAI_API_KEY="EMPTY"
from openai import OpenAI
client = OpenAI() # 環境変数から設定を読み込み
messages = [
{"role": "user", "content": "まどマギで一番可愛いキャラクターは誰?"},
]
response = client.chat.completions.create(
model="Holy-fox/Qwen3.5-0.8B-JP",
messages=messages,
max_tokens=32768,
temperature=1.0,
top_p=1.0,
presence_penalty=2.0,
extra_body={
"top_k": 20,
},
)
print(response.choices[0].message.content)
推奨パラメータについて
presence_penalty=2.0は繰り返し抑制のために設定しています。小規模モデルでは同じフレーズのループが発生しやすいため、この値を下げる場合は出力を注意深く確認してください。
/think トークンや thinking モードを有効にした推論は想定していません。Base model
Qwen/Qwen3.5-0.8B-Base