Instructions to use DanielTobi0/qwen3.8-27b-merged with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use DanielTobi0/qwen3.8-27b-merged with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="DanielTobi0/qwen3.8-27b-merged") 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("DanielTobi0/qwen3.8-27b-merged") model = AutoModelForMultimodalLM.from_pretrained("DanielTobi0/qwen3.8-27b-merged", 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]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use DanielTobi0/qwen3.8-27b-merged with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "DanielTobi0/qwen3.8-27b-merged" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "DanielTobi0/qwen3.8-27b-merged", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/DanielTobi0/qwen3.8-27b-merged
- SGLang
How to use DanielTobi0/qwen3.8-27b-merged 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 "DanielTobi0/qwen3.8-27b-merged" \ --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": "DanielTobi0/qwen3.8-27b-merged", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'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 "DanielTobi0/qwen3.8-27b-merged" \ --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": "DanielTobi0/qwen3.8-27b-merged", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }' - Unsloth Studio
How to use DanielTobi0/qwen3.8-27b-merged with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for DanielTobi0/qwen3.8-27b-merged to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for DanielTobi0/qwen3.8-27b-merged to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for DanielTobi0/qwen3.8-27b-merged to start chatting
Load model with FastModel
pip install unsloth from unsloth import FastModel model, tokenizer = FastModel.from_pretrained( model_name="DanielTobi0/qwen3.8-27b-merged", max_seq_length=2048, ) - Docker Model Runner
How to use DanielTobi0/qwen3.8-27b-merged with Docker Model Runner:
docker model run hf.co/DanielTobi0/qwen3.8-27b-merged
qwen3.8-27b-merged
unsloth/Qwen3.8-27B with a LoRA fine-tune merged into the weights, saved in 16-bit. Ready to load or serve directly, with no adapter composition step.
The standalone adapter is at DanielTobi0/qwen3.8-27b-lora (about 435 MB) if you already have the base weights and would rather not pull ~55 GB.
This model was trained on prompts rendered with
reasoning_effort="xhigh". The Qwen3.8 chat template injects a different instruction line (or none at all) for other effort levels, so serving it at another setting changes the system prefix it was conditioned on. Passreasoning_effort="xhigh"when you apply the chat template — see below.
Loading
import torch
from transformers import AutoModelForImageTextToText, AutoTokenizer
REPO = "DanielTobi0/qwen3.8-27b-merged"
model = AutoModelForImageTextToText.from_pretrained(
REPO,
dtype = torch.bfloat16,
device_map = "auto",
)
model.eval()
tokenizer = AutoTokenizer.from_pretrained(REPO)
This is a native vision-language model (Qwen3_5ForConditionalGeneration), so it loads through
AutoModelForImageTextToText. Use AutoModelForCausalLM instead only if you want the text-only decoder
(Qwen3_5ForCausalLM) and intend to drop the vision tower. The weights are ~55 GB in bf16, so plan for an
80 GB accelerator, or pass a quantization_config to fit something smaller.
Qwen3.8's gated-deltanet layers have a fast Triton path that transformers does not ship. Without it you will
see The fast path is not available ... Falling back to torch implementation and noticeably slower inference.
Install flash-linear-attention and
causal-conv1d, or load through Unsloth, which bundles them.
Generating
messages = [
{"role": "system", "content": "You are Crowther AI. Respond authoritatively, precisely, and formally using 'we' without contractions or em dashes."},
{"role": "user", "content": "Which layer of the sovereign intelligence stack is partnered rather than owned?"},
]
text = tokenizer.apply_chat_template(
messages,
tokenize = False,
add_generation_prompt = True,
reasoning_effort = "xhigh", # must match training
)
inputs = tokenizer(text, return_tensors = "pt").to(model.device)
outputs = model.generate(**inputs, max_new_tokens = 1024, do_sample = False)
print(tokenizer.decode(outputs[0][inputs.input_ids.shape[1]:], skip_special_tokens = True))
Reading the output
add_generation_prompt=True ends the prompt with <|im_start|>assistant\n<think>\n, so generation begins
already inside the thinking block. The model emits its reasoning, closes it with </think>, then writes the
answer. Split on the closing tag to separate them:
reasoning, _, answer = decoded.partition("</think>")
Set enable_thinking=False in apply_chat_template to suppress reasoning, but note the model was trained
exclusively on thinking-enabled examples.
Serving
The merged weights are a standard qwen3_5 checkpoint, so any runtime with Qwen3.8 support can serve them —
for example:
vllm serve DanielTobi0/qwen3.8-27b-merged --dtype bfloat16
Pass the reasoning effort through your client's chat-template arguments (in an OpenAI-compatible request,
chat_template_kwargs: {"reasoning_effort": "xhigh"}) so the system prefix matches training. Serving
configuration was not exercised during this fine-tune — verify the rendered prompt before relying on it.
Training
| Base model | unsloth/Qwen3.8-27B (27B, hybrid gated-deltanet + gated attention, VLM) |
| Dataset | DanielTobi0/qwen3_finetuning_dataset — 236 samples |
| Method | LoRA (SFT) merged to 16-bit, loss on assistant turns only |
| Trainable params | 108,789,760 of 27,465,518,320 (0.40%) |
| Rank / alpha / dropout | 16 / 16 / 0 |
| Sequence length | 2048 (longest sample: 1,822 tokens — no truncation) |
| Epochs / steps | 3 / 90 |
| Effective batch | 8 (2 per device × 4 accumulation) |
| Optimizer | adamw_8bit, weight decay 0.01 |
| LR schedule | 2e-4, linear decay, 5% warmup |
| Precision | bfloat16 |
| Hardware | 1 × NVIDIA H100 PCIe 80GB |
| Runtime | 447 s |
| Final train loss | 0.9225 (mean), 0.7599 (last step) |
Adapted modules
Qwen3.8-27B interleaves two attention types, so the fine-tune covered both rather than the usual seven names:
q_proj,k_proj,v_proj,o_proj— the 16 full gated-attention layersin_proj_qkv,in_proj_z,out_proj— the 48 gated-deltanet linear-attention layersgate_proj,up_proj,down_proj— the MLP in all 64 layers
Targeting only the standard four attention names would leave 48 of 64 layers unadapted.
Limitations
The training set is small (236 samples) and was trained for 3 epochs at 2e-4, which is an aggressive schedule for a 27B model at this data scale. The model reliably reproduces the target register and reasoning format, but it does not reliably reproduce the factual content of the training data — spot checks show it confabulating specifics that contradict its own training examples. Treat it as a style and format fine-tune, not a knowledge base, and ground factual claims externally.
- Downloads last month
- -