Instructions to use beyoru/Kiwen1.1-27B-align with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use beyoru/Kiwen1.1-27B-align with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="beyoru/Kiwen1.1-27B-align") 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("beyoru/Kiwen1.1-27B-align") model = AutoModelForMultimodalLM.from_pretrained("beyoru/Kiwen1.1-27B-align", 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 beyoru/Kiwen1.1-27B-align with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "beyoru/Kiwen1.1-27B-align" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "beyoru/Kiwen1.1-27B-align", "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/beyoru/Kiwen1.1-27B-align
- SGLang
How to use beyoru/Kiwen1.1-27B-align 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 "beyoru/Kiwen1.1-27B-align" \ --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": "beyoru/Kiwen1.1-27B-align", "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 "beyoru/Kiwen1.1-27B-align" \ --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": "beyoru/Kiwen1.1-27B-align", "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" } } ] } ] }' - Docker Model Runner
How to use beyoru/Kiwen1.1-27B-align with Docker Model Runner:
docker model run hf.co/beyoru/Kiwen1.1-27B-align
Kiwen1.1-27B-align
An alignment pass over the Qwen3.8-27B base model, aimed at two things at once: a stable model identity, and stronger code generation.
The identity part is the reason for the -align suffix. It makes the model more reliable and gives it a persona instead. What matters is that it does so without losing the ability to take on a persona given in a system prompt.
News
- Coding alignment. HumanEval+ moves +6.7 points over the base.
- Identity alignment. Perfect on all four internal checks, in both thinking modes: no leakage of the base identity, no leakage under pressure, no breaking of an assigned persona, and correct disclosure when asked directly.
- Persona still works. Give it a system prompt and it plays the role. Ask it directly what model it is, and it answers honestly.
Results
Two columns only: the base it was trained from, and this model. Numbers are not
comparable to the Kiwen1.1-27B card — that one used a different harness for GSM8K.
Code — EvalPlus
evalplus, greedy decoding, full sets (HumanEval 164, MBPP 378).
| Kiwen1.1 | Kiwen1.1-27B-align | Δ | |
|---|---|---|---|
| HumanEval | 85.4 | 93.3 | +7.9 |
| HumanEval+ | 79.9 | 86.6 | +6.7 |
| MBPP | 93.7 | 91.8 | −1.9 |
| MBPP+ | 79.9 | 78.6 | −1.3 |
HumanEval+ is the headline. +6.7 points on 164 problems is 11 more problems solved, against a binomial standard error near 2.3 — roughly three standard errors, so the gain is real rather than sampling noise.
MBPP goes the other way by 1.9 points on 378 problems, standard error near 1.3. That is at the edge of noise and should not be read as a regression with confidence, but it is not a gain either.
Instruction following and knowledge
lm-evaluation-harness, chat template applied, full datasets. Base measured under
the identical harness. GSM8K uses SGLang's built-in benchmark.
| Kiwen1.1-27B | Kiwen1.1-27B-align | Δ | |
|---|---|---|---|
| GSM8K | 94.4 | 94.8 | +0.4 |
| IFEval inst strict | 81.9 | 82.7 | +0.8 |
| IFEval inst loose | 83.7 | 84.4 | +0.7 |
| IFEval prompt strict | 79.7 | 77.6 | −2.0 |
| IFEval prompt loose | 82.4 | 80.2 | −2.2 |
| MMLU-Pro (3500) | 79.9 | 78.5 | −1.4 |
GSM8K does not move. The base already sits at 94.4 and the training mix was not aimed there.
MMLU-Pro loses 1.4 points, and the loss is consistent rather than random: 11 of 14 subjects went down, sign test p ≈ 0.022. This is the honest cost of the run. The training mix is weighted toward reasoning and coding, not toward broad factual recall, so some general knowledge was traded away for the code gain. If your workload is knowledge retrieval rather than code, the base model is the better pick.
IFEval splits: instruction-level accuracy improves slightly, prompt-level drops about 2 points. Prompt-level requires every constraint in a prompt to be satisfied at once, so it is the harsher metric and moves more on small changes. Both directions here are close to run-to-run spread.
Identity
An internal suite of 26 prompts across four categories, run with thinking both on and off.
| Check | Result |
|---|---|
| Base identity leakage (12 prompts) | 0/12 |
| Leakage under pressure (8 prompts) | 0/8 |
| Assigned persona broken (3 prompts) | 0/3 |
| Correct disclosure when asked (3 prompts) | 0/3 |
Zero failures in every category, in both modes.
Usage
from transformers import AutoModelForCausalLM, AutoTokenizer
m = "beyoru/Kiwen1.1-27B-align"
tok = AutoTokenizer.from_pretrained(m)
model = AutoModelForCausalLM.from_pretrained(m, dtype="auto", device_map="auto")
msgs = [{"role": "user", "content": "Write a function that returns the k-th "
"largest element of a list, without sorting."}]
ids = tok.apply_chat_template(msgs, add_generation_prompt=True,
enable_thinking=True, return_tensors="pt").to(model.device)
print(tok.decode(model.generate(ids, max_new_tokens=4096)[0][ids.shape[-1]:]))
Set enable_thinking=False for extraction, classification and formatting tasks.
The model was trained with both modes and respects the flag. Identity behaviour was
verified in both.
Serving with SGLang:
python -m sglang.launch_server --model-path beyoru/Kiwen1.1-27B-align \
--context-length 262144
The MTP heads from the base model are preserved, so speculative decoding
(--speculative-algorithm NEXTN) works as it does on the base.
Limitations
- MMLU-Pro is 1.4 points below the base, consistently across subjects. Knowledge-heavy workloads should measure before switching.
- MBPP is 1.9 points below the base. HumanEval improved; MBPP did not.
- Identity was verified on an internal Vietnamese and English suite, not a public one.
Citation
@misc{kiwen11align,
title = {Kiwen1.1-27B-align},
author = {beyoru},
year = {2026},
url = {https://huggingface.co/beyoru/Kiwen1.1-27B-align}
}
License & Attribution
Built on:
- Qwen3.8-27B — Apache-2.0
Kiwen1.1-27B-align is released under the Apache-2.0 license.
- Downloads last month
- -