Instructions to use nyxia/phenome-qwen3.5-4b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use nyxia/phenome-qwen3.5-4b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="nyxia/phenome-qwen3.5-4b") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("nyxia/phenome-qwen3.5-4b") model = AutoModelForCausalLM.from_pretrained("nyxia/phenome-qwen3.5-4b") 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]:])) - PEFT
How to use nyxia/phenome-qwen3.5-4b with PEFT:
Task type is invalid.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use nyxia/phenome-qwen3.5-4b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "nyxia/phenome-qwen3.5-4b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "nyxia/phenome-qwen3.5-4b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/nyxia/phenome-qwen3.5-4b
- SGLang
How to use nyxia/phenome-qwen3.5-4b 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 "nyxia/phenome-qwen3.5-4b" \ --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": "nyxia/phenome-qwen3.5-4b", "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 "nyxia/phenome-qwen3.5-4b" \ --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": "nyxia/phenome-qwen3.5-4b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use nyxia/phenome-qwen3.5-4b with Docker Model Runner:
docker model run hf.co/nyxia/phenome-qwen3.5-4b
phenome-qwen3.5-4b 🧬
A genome instead of a system prompt.
This is Qwen3.5-4B (the Kewk/Heretical-Qwen3.5-4B base) with the phenome LoRA
merged in. It's trained to read a compact symbolic genome string as its persona spec —
so instead of a few-thousand-token system prompt, you condition the model on ~110 tokens
and get a fully-specified personality.
🎮 Try it live: phenome playground Space · 📝 The idea: Should we use genetics instead of system prompts for AI Agents & Personas?
What is a genome?
A registry of 64 trait loci (verbosity, formality, warmth, humor, structure, markdown,
banned-openers, profanity, reasoning style, safety posture…), 251 alleles, and 4
intensity tiers per allele. 21 of those loci are always-on "general assistant" traits; the
rest are domain-specific and activate per context. A full genome packs as a dense
`126-char` alpha string — Qwen's BPE tokenizer merges the letter runs so it fits in ~110
tokens. Same encoding the WaifuHatch breeding game uses for its characters, which
means you can literally breed two personas (per-locus inheritance + mutation).
The string the model sees at inference is just:
You are <Name>. Here is your genome: aabdababcbcaacccbbadbabca...
No written personality. The model learned to map the symbolic string → the behavioral shape a verbose teacher prompt would have produced.
Why
- 15–30× shorter system prompts. ~110 tokens for the persona instead of 3–5k. The rest of your context window goes back to RAG / conversation / tools.
- Portable personas. Any model trained on the same encoding speaks the same genome — hand the string between models and the persona travels.
- Auditable, dial-able traits. Crank
DESTRUCTIVE_CAUTIONto 3, lock NSFW off, setVERBOSITY:terse— predictable behavior you can read off the genome instead of a 4k-word prompt. - Breedable. It's a real genome from a breeding game. Cross two good agents → a child agent that inherits both.
Usage
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "nyxia/phenome-qwen3.5-4b"
tok = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id, torch_dtype=torch.bfloat16).to("cuda")
# A genome string (see the phenome engine / playground to roll or build one).
genome = "aabdababcbcaacccbbadbabcaebaccafcdadagcadbahacbcaicaedajbdebamdcdcanabccaobdbdapbbbdaqcaabascaabatcaabauadacavebeabcbbaccladab"
system = f"You are Vesper. Here is your genome: {genome}"
messages = [
{"role": "system", "content": system},
{"role": "user", "content": "Explain how a bug in my code might happen."},
]
ids = tok.apply_chat_template(messages, add_generation_prompt=True, return_tensors="pt").to(model.device)
out = model.generate(ids, max_new_tokens=220, temperature=0.6, top_p=0.8, top_k=20, repetition_penalty=1.05)
print(tok.decode(out[0, ids.shape[1]:], skip_special_tokens=True))
Recommended sampling (matches training context): temperature=0.6, top_p=0.8, top_k=20, repetition_penalty=1.05.
Training
- Base:
Kewk/Heretical-Qwen3.5-4B - Method: LoRA (r=64, α=128, dropout 0.05) on all attention + MLP projections, merged to a standalone model.
- Data: synthetic multi-turn chatml — for each random genome, a verbose human-readable persona prompt is sent to a teacher model; the trainee is trained on the compact genome string + user turn → teacher response. The model learns the compression.
Status & honesty
This is a research artifact, not a product. It's a step up from the 0.8B Phase 0 proof (which already shifted outputs in the genome direction on ~68% of paired prompts). The conditioning clearly works — verbosity, confidence-hedging, structure, register, and tone all track the genome — but coverage and consistency scale with model size, data, and compute.
License
Inherits the base model's license. Genome engine + dataset tooling by the phenome project.
- Downloads last month
- 36