You need to agree to share your Hugging Face information to access this model

This repository is publicly accessible, but you have to accept the conditions to access its files and content.

Log in or Sign Up to review the conditions and access this model content.

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 (or system-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: false to 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) and max_tokens around 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 openuiLibrary components, including static layouts and local reactive features (bindings, conditional visibility, modals, @Set/@Reset, @Count/@Sum/@Avg/@Filter/@Sort).
  • Not covered: Query/Mutation/@Run tool 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
-
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for SeeyonAI/seeyon-sii-27b-lora

Base model

Qwen/Qwen3.8-27B
Adapter
(264)
this model