Instructions to use SeeyonAI/seeyon-sii-27b-lora with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use SeeyonAI/seeyon-sii-27b-lora with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen3.8-27B") model = PeftModel.from_pretrained(base_model, "SeeyonAI/seeyon-sii-27b-lora") - Notebooks
- Google Colab
- Kaggle
seeyon-sii-27b-lora
LoRA adapter for Qwen/Qwen3.8-27B (revision 1d4bf0f2ff6012fd82039f2fa52739d0dd7c60c0) that turns English or Chinese UI requests into OpenUI Lang programs for the built-in OpenUI component library. Output is a bare program (no Markdown fences, no explanation) that starts with root = Stack(...).
Files
| File | Purpose |
|---|---|
adapter_model.safetensors, adapter_config.json |
PEFT LoRA weights (r = 16) for the language model only |
system-prompt.txt |
Required system prompt for English requests |
system-prompt-zh.txt |
Required system prompt for Chinese requests (same rules plus Chinese UI-text instructions) |
Required settings
- System prompt: send the full contents of
system-prompt.txt(orsystem-prompt-zh.txt) as the system message on every request. The adapter relies on it for component signatures; do not shorten it. - Thinking off: pass
enable_thinking: falseto the chat template. - Context: the prompt is about 7.1k tokens before the request; allow at least 12k tokens of context.
- Decoding: greedy (
temperature 0) andmax_tokensaround 2048. - Follow-up edits: keep earlier turns in
messages. The model returns a complete replacement program, not a diff.
Serve with vLLM
vllm serve Qwen/Qwen3.8-27B --revision 1d4bf0f2ff6012fd82039f2fa52739d0dd7c60c0 \
--max-model-len 20480 --limit-mm-per-prompt '{"image":0,"video":0}' \
--enable-lora --max-lora-rank 16 --lora-modules openui=SeeyonAI/seeyon-sii-27b-lora
from pathlib import Path
from openai import OpenAI
system = Path('system-prompt.txt').read_text()
client = OpenAI(base_url='http://localhost:8000/v1', api_key='EMPTY')
reply = client.chat.completions.create(
model='openui',
messages=[
{'role': 'system', 'content': system},
{'role': 'user', 'content': 'Show a card titled Weekly sales with a bar chart: Mon 12, Tue 18, Wed 9.'},
],
temperature=0,
max_tokens=2048,
extra_body={'chat_template_kwargs': {'enable_thinking': False}},
)
print(reply.choices[0].message.content)
On RTX PRO 6000 / other sm_120 GPUs with vLLM 0.30, set VLLM_USE_FLASHINFER_SAMPLER=0.
Use with Transformers + PEFT
from pathlib import Path
import torch
from peft import PeftModel
from transformers import AutoModelForImageTextToText, AutoTokenizer
base_id, rev = 'Qwen/Qwen3.8-27B', '1d4bf0f2ff6012fd82039f2fa52739d0dd7c60c0'
tokenizer = AutoTokenizer.from_pretrained(base_id, revision=rev)
model = AutoModelForImageTextToText.from_pretrained(base_id, revision=rev, dtype=torch.bfloat16, device_map='auto')
model = PeftModel.from_pretrained(model, 'SeeyonAI/seeyon-sii-27b-lora')
messages = [
{'role': 'system', 'content': Path('system-prompt-zh.txt').read_text()},
{'role': 'user', 'content': '显示一张卡片:本周订单 128 单,较上周增长 12%。'},
]
inputs = tokenizer.apply_chat_template(messages, add_generation_prompt=True, enable_thinking=False, return_tensors='pt', return_dict=True).to(model.device)
output = model.generate(**inputs, max_new_tokens=2048, do_sample=False)
print(tokenizer.decode(output[0, inputs['input_ids'].shape[1]:], skip_special_tokens=True))
Install flash-linear-attention and causal-conv1d; without them, the model's linear-attention layers fall back to slow PyTorch code. To merge the adapter into the base weights, use model.merge_and_unload(); this needs about 55 GB of disk for the merged copy.
Render the output
Parse and render programs with the OpenUI SDK versions the prompt was generated from: @openuidev/react-ui@0.18.0, @openuidev/react-lang@1.0.0, @openuidev/lang-core@1.0.0 (openuiLibrary). Validate before rendering, and treat form submissions and buttons as requests sent back to the assistant, not as completed backend actions.
Scope
- Covers the built-in
openuiLibrarycomponents, including static layouts and local reactive features (bindings, conditional visibility, modals,@Set/@Reset,@Count/@Sum/@Avg/@Filter/@Sort). - Not covered:
Query/Mutation/@Runtool integrations, incremental patch output, or custom component libraries. - Outputs can still occasionally fail schema validation, for example when chart label and value counts differ. Always parse with the SDK before display.
- Downloads last month
- -
Model tree for SeeyonAI/seeyon-sii-27b-lora
Base model
Qwen/Qwen3.8-27B