Instructions to use Terminator-of-AI/IsoFormer with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Terminator-of-AI/IsoFormer with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Terminator-of-AI/IsoFormer") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Terminator-of-AI/IsoFormer") model = AutoModelForCausalLM.from_pretrained("Terminator-of-AI/IsoFormer", 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=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Terminator-of-AI/IsoFormer with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Terminator-of-AI/IsoFormer" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Terminator-of-AI/IsoFormer", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Terminator-of-AI/IsoFormer
- SGLang
How to use Terminator-of-AI/IsoFormer 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 "Terminator-of-AI/IsoFormer" \ --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": "Terminator-of-AI/IsoFormer", "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 "Terminator-of-AI/IsoFormer" \ --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": "Terminator-of-AI/IsoFormer", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Terminator-of-AI/IsoFormer with Docker Model Runner:
docker model run hf.co/Terminator-of-AI/IsoFormer
IsoFormer
IsoFormer is a Chinese language model trained on large-scale Chinese novel corpora.
The model adopts a symmetric-dimension Transformer architecture, where word embeddings, attention projections (Q/K/V), and feed-forward layers share the same dimensionality.
Perhaps the current transformer model contains the largest Q, K, V Dim, HAHA.
Model Details
Qwen3ForCausalLM type
Model Description
Model type: Transformer Decoder Language Model
Architecture: Unified-Dimension Transformer
Training data: Chinese novels and narrative text corpora
Language: Chinese
License: (Apache-2.0)
Key Features
Unified dimensionality architecture
Simplified transformer design
Optimized for Chinese narrative generation
Reduced parameter redundancy
Unlike conventional transformers where the feed-forward layer expands the hidden size (e.g., 4× expansion), IsoFormer keeps all core modules at the same dimensionality.
Architecture
IsoFormer introduces a symmetric Transformer architecture.
Typical Transformer:
Embedding: d
Attention: d
MLP: 4d → d
IsoFormer:
Embedding: d
Q projection: d
K projection: d
V projection: d
MLP: d → d
This unified design provides:
Maintaining equal dimensions, without any dimensional changes, is more conducive to model training and reduces the additional accuracy loss caused by dimensionality changes. With Q, K, V, and Word embeddings all within the same dimension in MLPs, reducing the number of Head elements to 1 and increasing the Q, K, and V dim values to 1536 enhances expressive power. We will then verify whether this approach is more effective.
structural simplicity
reduced parameter count
more regular compute patterns
which may improve efficiency on certain hardware.
Training Details
Training Device
4060ti 16G
one epoch
It consumed approximately 10 kilowatt-hours of electricity.
loss to 4.0
Training Data
The model was trained primarily on Chinese fiction datasets, including:
about 1000 web novels, about 2G, so you should talk with it by Chinese
only pretraing stage, No dialogue mode.
Training objective:
Causal Language Modeling (CLM)
Optimization:
AdamW optimizer
cosine learning rate schedule
mixed precision training
Tokenization:
BPE / SentencePiece tokenizer
Intended Uses
IsoFormer is designed for:
Chinese story generation
novel writing assistance
narrative text modeling
Example applications:
AI novel writing
roleplay chatbots
storytelling tools
Limitations
The model has several limitations:
Primarily trained on fictional text
May produce hallucinated information
Not optimized for factual QA or technical knowledge
May reflect biases present in online fiction datasets
Users should verify outputs when using the model in production environments.
Example Usage
Using HuggingFace Transformers:
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("Terminator-of-AI/IsoFormer")
model = AutoModelForCausalLM.from_pretrained("Terminator-of-AI/IsoFormer")
prompt = "少女抬头看向远方的天空"
inputs = tokenizer(prompt, return_tensors="pt")
outputs = model.generate(**inputs, max_new_tokens=100)
print(tokenizer.decode(outputs[0]))
Others
Feel free to leave a comment if you're interested; a good job is also welcome.
- Downloads last month
- 9