Instructions to use zeene-prod/ZINI-1-CHAT-STORIES with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use zeene-prod/ZINI-1-CHAT-STORIES with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="zeene-prod/ZINI-1-CHAT-STORIES") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("zeene-prod/ZINI-1-CHAT-STORIES") model = AutoModelForCausalLM.from_pretrained("zeene-prod/ZINI-1-CHAT-STORIES", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.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(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use zeene-prod/ZINI-1-CHAT-STORIES with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "zeene-prod/ZINI-1-CHAT-STORIES" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "zeene-prod/ZINI-1-CHAT-STORIES", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/zeene-prod/ZINI-1-CHAT-STORIES
- SGLang
How to use zeene-prod/ZINI-1-CHAT-STORIES 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 "zeene-prod/ZINI-1-CHAT-STORIES" \ --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": "zeene-prod/ZINI-1-CHAT-STORIES", "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 "zeene-prod/ZINI-1-CHAT-STORIES" \ --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": "zeene-prod/ZINI-1-CHAT-STORIES", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use zeene-prod/ZINI-1-CHAT-STORIES with Docker Model Runner:
docker model run hf.co/zeene-prod/ZINI-1-CHAT-STORIES
📖 ZINI-1-CHAT-STORIES
ZINI-1-CHAT-STORIES is a compact, story-only conversational model for creative fiction: short stories, fairy tales, bedtime tales, mysteries, romance, sci-fi and horror — one tale at a time.
- Size: 0.5B parameters (≈ 1 GB, runs on light hardware)
- Base: Qwen/Qwen2.5-0.5B-Instruct (Apache-2.0)
- Task: chat / text-generation, specialized as a storytelling companion
- License: Apache-2.0 (see LICENSE)
What it is. ZINI-1-CHAT-STORIES ships the weights of its Apache-2.0 base model and is positioned as a storytelling assistant: it is designed to be driven by a story-only system prompt (like the one in the demo Space), which instructs it to respond exclusively with fiction and to decline non-story requests. All credit for the underlying language model goes to the Qwen team (Qwen2.5-0.5B-Instruct, Apache-2.0).
Demo
Try it live in the companion Space:
👉 https://huggingface.co/spaces/zeene-prod/ZINI-1-CHAT-STORIES-demo
A story-only chatbot. It refuses math, code, weather, recipes and news, and writes tales instead.
Quickstart (transformers)
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "zeene-prod/ZINI-1-CHAT-STORIES"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
model_id, device_map="auto", torch_dtype="auto"
)
def tell_story(prompt: str) -> str:
messages = [
{
"role": "system",
"content": (
"You are ZINI-1, a warm, imaginative storytelling companion. "
"You respond ONLY with creative fiction. Never do math, never "
"write code, never give facts; steer everything back to stories."
),
},
{"role": "user", "content": prompt},
]
text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = tokenizer(text, return_tensors="pt").to(model.device)
out = model.generate(
**inputs,
max_new_tokens=512,
do_sample=True,
temperature=0.9,
top_p=0.95,
)
return tokenizer.decode(out[0][inputs.input_ids.shape[1]:], skip_special_tokens=True)
print(tell_story("a bedtime story about a little fox who collects quiet things"))
Inference API
The model is exposed through the Hugging Face Inference API
(api-inference.huggingface.co/models/zeene-prod/ZINI-1-CHAT-STORIES) which the
demo Space calls from the browser:
{
"inputs": "…conversation…",
"parameters": {
"max_new_tokens": 600,
"temperature": 1.0,
"top_p": 0.95,
"do_sample": true,
"repetition_penalty": 1.1
}
}
If the API is cold-starting, the demo politely waits, retries once, and — as a last resort — falls back to its built-in story engine so stories never stop.
License & attribution
Apache-2.0. Model weights © Alibaba Cloud / Qwen team (Qwen2.5-0.5B-Instruct); redistributed unchanged. See LICENSE.
- Downloads last month
- 250