Dampfinchen/Creative_Writing_Multiturn
Viewer • Updated • 4.64k • 1.74k • 35
How to use Ks01/UwU-Qwen3.5-27B-v0.1 with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="Ks01/UwU-Qwen3.5-27B-v0.1")
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("Ks01/UwU-Qwen3.5-27B-v0.1")
model = AutoModelForMultimodalLM.from_pretrained("Ks01/UwU-Qwen3.5-27B-v0.1", 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]:]))How to use Ks01/UwU-Qwen3.5-27B-v0.1 with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "Ks01/UwU-Qwen3.5-27B-v0.1"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/chat/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "Ks01/UwU-Qwen3.5-27B-v0.1",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'docker model run hf.co/Ks01/UwU-Qwen3.5-27B-v0.1
How to use Ks01/UwU-Qwen3.5-27B-v0.1 with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "Ks01/UwU-Qwen3.5-27B-v0.1" \
--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": "Ks01/UwU-Qwen3.5-27B-v0.1",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'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 "Ks01/UwU-Qwen3.5-27B-v0.1" \
--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": "Ks01/UwU-Qwen3.5-27B-v0.1",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'How to use Ks01/UwU-Qwen3.5-27B-v0.1 with Docker Model Runner:
docker model run hf.co/Ks01/UwU-Qwen3.5-27B-v0.1
Experimental. Early-stage fine-tune. Expect rough edges.
Qwen3.5-27B fine-tune for creative writing, roleplay, and reasoning. ~20M tokens (~8.5K samples) of curated data. Retains the base model's vision-language (VL) capabilities.
Tuned toward prose-style creative output rather than assistant-style responses.
~8.5K samples, mixed:
| Feature | Description |
|---|---|
| Base Model | Qwen/Qwen3.5-27B |
| Architecture | Qwen3.5 VL (27B Dense + MTP) |
| Precision | bf16 |
| Context Length | 131,072 tokens |
Supports Qwen3.5's native thinking mode:
<think> block before responding. Useful for complex scenes or multi-character interactions.<think> block. Better for fast, fluid exchanges.vllm serve Ks01/UwU-Qwen3.5-27B-v0.1 \
--trust-remote-code \
--max-model-len 131072 \
--gpu-memory-utilization 0.90
from transformers import AutoModelForCausalLM, AutoTokenizer
model = AutoModelForCausalLM.from_pretrained(
"Ks01/UwU-Qwen3.5-27B-v0.1",
torch_dtype="bfloat16",
device_map="auto",
trust_remote_code=True,
)
tokenizer = AutoTokenizer.from_pretrained("Ks01/UwU-Qwen3.5-27B-v0.1")
messages = [
{"role": "user", "content": "Write a tense reunion scene between two old friends at a rainy bus stop."}
]
text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = tokenizer(text, return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_new_tokens=2048, temperature=0.7)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
Fine-tuned from ArliAI/Qwen-3.5-27B-Derestricted, based on Qwen/Qwen3.5-27B.
Apache 2.0, inherited from Qwen3.5.