Instructions to use deahmed/Qwen3.5-2B-da-sft with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use deahmed/Qwen3.5-2B-da-sft with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="deahmed/Qwen3.5-2B-da-sft") 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("deahmed/Qwen3.5-2B-da-sft") model = AutoModelForMultimodalLM.from_pretrained("deahmed/Qwen3.5-2B-da-sft") 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 deahmed/Qwen3.5-2B-da-sft with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "deahmed/Qwen3.5-2B-da-sft" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "deahmed/Qwen3.5-2B-da-sft", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/deahmed/Qwen3.5-2B-da-sft
- SGLang
How to use deahmed/Qwen3.5-2B-da-sft 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 "deahmed/Qwen3.5-2B-da-sft" \ --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": "deahmed/Qwen3.5-2B-da-sft", "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 "deahmed/Qwen3.5-2B-da-sft" \ --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": "deahmed/Qwen3.5-2B-da-sft", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use deahmed/Qwen3.5-2B-da-sft with Docker Model Runner:
docker model run hf.co/deahmed/Qwen3.5-2B-da-sft
Qwen3.5-2B-da-sft
A Danish-adapted version of Qwen/Qwen3.5-2B. The base model was fine-tuned on Danish instruction data with LoRA, and the resulting adapter was then merged back into the base weights at 0.3 strength (a weight interpolation between the fine-tuned and original weights). The aim was to raise Danish scores on EuroEval while keeping most of the base model's existing behaviour.
On the EuroEval Danish test split it scores about 0.9 points higher on average than the base model across the eight benchmark datasets. The gains are uneven: several tasks improve, a couple are unchanged, and one (common-sense reasoning) regresses. Details are below.
Base model
Qwen/Qwen3.5-2B, released under Apache-2.0. It is a composite text and vision model. Only the text transformer was trained here. The vision components are carried over unchanged and were not tested.
Method
- LoRA supervised fine-tuning (rank 128) on a Danish instruction mix of about 32,000 examples: synthetic instruction pairs generated with the DeepSeek API from modern Danish source text, a set of examples written in EuroEval answer formats (single-word sentiment labels, yes/no grammaticality, multiple-choice letters), the skolegpt-instruct dataset, and roughly 12% English data to limit forgetting.
- The trained adapter was folded into the base weights at strength 0.3, following the WiSE-FT idea (W = W_base + 0.3 x delta). Merging at full strength improved generation tasks but hurt the constrained-choice tasks; a partial merge kept most of the Danish gains while limiting those regressions. Strength 0.3 gave the best average on the validation split, and that choice was then checked once on the test split.
Evaluation
EuroEval, Danish test split, same generation settings for both models. The metric is the one EuroEval ranks each dataset on (MCC, F1, or BERTScore).
| Dataset | Metric | Base | This model | Change |
|---|---|---|---|---|
| AngryTweets (sentiment) | MCC | 38.88 | 41.70 | +2.82 |
| ScaLA-da (acceptability) | MCC | 31.28 | 31.13 | -0.15 |
| DANSK (NER) | F1 | 42.87 | 44.93 | +2.06 |
| MultiWikiQA-da (reading comp.) | F1 | 74.52 | 76.17 | +1.66 |
| Nordjylland News (summ.) | BERTScore | 64.27 | 64.98 | +0.72 |
| Danske Talemaader (idioms) | MCC | 39.49 | 39.10 | -0.39 |
| Danish Citizen Tests (civics) | MCC | 29.05 | 32.95 | +3.90 |
| HellaSwag-da (common sense) | MCC | 31.61 | 28.20 | -3.41 |
| Mean | +0.90 |
Five datasets improve, two are unchanged within noise, and HellaSwag-da drops by 3.4 points. The largest gains are on sentiment, reading comprehension, and the citizenship-knowledge task.
Intended use and limitations
- Meant for Danish text tasks of the kind EuroEval covers. English ability is largely retained but was not the focus.
- HellaSwag-da (common-sense reasoning) is worse than the base model. If that task matters for your use, consider the base model or a lower merge strength.
- The idiom and civics tasks improved only a little. Supervised fine-tuning does not add new factual knowledge, so larger gains on knowledge-heavy tasks would require continued pretraining on Danish text.
- The base model's vision capabilities were neither trained nor evaluated.
- Results are single-run EuroEval scores. Per-dataset differences of a point or two are within the range of normal variation.
Training data and licensing
- Base model: Qwen3.5-2B (Apache-2.0).
- Danish source text: the Dynaword corpus (Danish Wikipedia, retsinformation, and other permissively licensed sources). The EuroEval benchmark datasets were excluded from training to avoid contamination.
- Synthetic instruction data: generated through the DeepSeek API, whose platform terms permit using outputs to train and release models.
- English data: FineWeb-Edu (ODC-By).
Released under Apache-2.0, following the base model. This is an independent fine-tune and is not affiliated with or endorsed by Alibaba, the Qwen team, or DeepSeek. "Qwen" is used only to identify the base model.
- Downloads last month
- 213