Text Generation
Transformers
Safetensors
English
qwen3_5_text
code
lora
cuda
habbo
game-server-emulation
flash
shockwave
continued-pretraining
qwen3.5
hybrid-attention
gated-deltanet
conversational
Instructions to use h4bbo/FuseLLM-9B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use h4bbo/FuseLLM-9B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="h4bbo/FuseLLM-9B") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("h4bbo/FuseLLM-9B") model = AutoModelForCausalLM.from_pretrained("h4bbo/FuseLLM-9B") 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 h4bbo/FuseLLM-9B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "h4bbo/FuseLLM-9B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "h4bbo/FuseLLM-9B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/h4bbo/FuseLLM-9B
- SGLang
How to use h4bbo/FuseLLM-9B 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 "h4bbo/FuseLLM-9B" \ --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": "h4bbo/FuseLLM-9B", "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 "h4bbo/FuseLLM-9B" \ --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": "h4bbo/FuseLLM-9B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use h4bbo/FuseLLM-9B with Docker Model Runner:
docker model run hf.co/h4bbo/FuseLLM-9B
File size: 9,347 Bytes
f352fd6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 | ---
library_name: transformers
base_model: Qwen/Qwen3.5-9B
tags:
- code
- lora
- cuda
- habbo
- game-server-emulation
- flash
- shockwave
- continued-pretraining
- qwen3.5
- hybrid-attention
- gated-deltanet
language:
- en
license: apache-2.0
inference: false
pipeline_tag: text-generation
---
# FuseLLM-9B
A domain-specialist code model for the **Habbo Hotel ecosystem** β server emulators (Java, C#, PHP, Rust) and Flash/Shockwave client tooling (ActionScript, LiveScript, SWF/DIR reverse engineering). Built by continued pretraining of **Qwen3.5-9B**'s language model on a curated corpus of ~85K source files (~211M tokens) drawn from Habbo emulator projects, decompiled client code, and CMS/database dumps.
The base `Qwen/Qwen3.5-9B` is a multimodal Qwen3.5 model (vision + text). This fine-tune targets and ships only its **text language model** (`Qwen3_5ForCausalLM`, 8.95B params) β the vision tower is not included in the released weights.
---
## tl;dr
- **What it is:** an ~9B-parameter model, LoRA-continued-pretrained on Habbo emulator + retro-client source code, merged into a standalone bf16 text causal LM.
- **Base:** `Qwen/Qwen3.5-9B` β Apache-2.0. Hybrid Qwen3.5 architecture: 24 Gated-DeltaNet (linear-attention) layers + 8 full-attention layers (1 full every 4), 32 layers total, hidden 4096, vocab 248320.
- **Trained on:** a single NVIDIA H100 80GB, CUDA 12.6, PyTorch 2.13.0+cu126. bf16 LoRA, no quantization, gradient checkpointing on. Used the `flash-linear-attention` (fla) fast path + `causal-conv1d` for the DeltaNet / short-conv layers.
- **Runs on:** a 9B model needs more than the 4B sibling but is still very consumer-friendly. A Q4_K_M GGUF is ~5 GB β fits in 8 GB VRAM (short context), comfortable at 12 GB. The full bf16 merged weights (~18 GB) need 24 GB. If your card has β₯8 GB and was made in the last ~6 years, it can run FuseLLM-9B at some quantization.
---
## Inference β yes, your GPU can run this
The point of shipping a ~9B model is strong domain capacity while still running on consumer hardware. The training rig was an 80 GB H100; **inference needs far less.**
| Path | Size | Min. VRAM (comfortable) | Notes |
|---|---|---|---|
| **GGUF Q4_K_M (recommended)** | ~5.0 GB | 12 GB (runs on 8 GB, short ctx) | Via Ollama / llama.cpp / LM Studio / KoboldCpp. CPU-only also works β slow but functional. |
| GGUF Q8_0 | ~9.5 GB | 16 GB (12 GB short ctx) | Near-lossless. |
| bf16 merged (full precision) | ~18 GB + KV cache | 24 GB | The "no quantization" path. 40 GB+ leaves room for a long context. |
Concrete examples of cards that run it fine:
- **8 GB:** RTX 3060 / 4060 / 5060, RX 6600 / 7600, Arc A580 β Q4_K_M with short context.
- **12 GB:** RTX 3060 12GB / 4070 / 5070, RX 6700 XT / 7700 XT β Q4_K_M with long context, or Q8_0 short context.
- **16 GB:** RTX 4060 Ti 16GB / 4080 / 5070 Ti, RX 7800 XT / 9070 β Q8_0 comfortably, or bf16 short context.
- **24 GB:** RTX 3090 / 4090 / 5090, RX 7900 XTX/XT β bf16 merged with a healthy context, or Q4 with room to spare.
Linux, Windows, macOS (Metal) all supported through llama.cpp / Ollama. **AMD, NVIDIA, and Intel are all first-class** β the GGUF backend is vendor-agnostic.
### Quick start (Ollama)
```bash
ollama run h4bbo/fusellm-9b # once uploaded
# or load the local GGUF:
ollama create fusellm-9b -f Modelfile # FROM ./fusellm-9b-Q4_K_M.gguf
ollama run fusellm-9b
```
### Quick start (transformers, bf16)
```python
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
tok = AutoTokenizer.from_pretrained("h4bbo/FuseLLM-9B")
model = AutoModelForCausalLM.from_pretrained(
"h4bbo/FuseLLM-9B",
torch_dtype=torch.bfloat16,
device_map="auto",
)
```
---
## Training details
### Hardware
| | |
|---|---|
| GPU | NVIDIA H100 80GB HBM3 |
| Stack | CUDA 12.6, PyTorch 2.13.0+cu126 |
| Fast path | `flash-linear-attention` 0.5.2 + `causal-conv1d` 1.6.2 (fla kernels for the Gated-DeltaNet layers; `causal-conv1d` for the short conv). `attn_implementation="sdpa"` β FlashAttention-2 does not cover the DeltaNet layers. |
A single 80 GB datacenter-class card. With gradient checkpointing and bf16 LoRA the full 9B fits without quantization. (The 4B sibling of this model was trained on a single 24 GB consumer AMD card via ROCm β see `h4bbo/FuseLLM-Instruct-4B-v1`.)
### Base model
`Qwen/Qwen3.5-9B` β Apache-2.0. Qwen3.5 hybrid architecture: 32 layers = 24 Gated-DeltaNet (linear attention) + 8 full attention (one full layer every four), hidden 4096, 16 attention heads, 4 KV heads (full-attn), head_dim 256, vocab 248320, max_position_embeddings 262144. The released weights are the text LM only (`Qwen3_5ForCausalLM`, 8.95B params, `tie_word_embeddings=False`); the base's vision tower is not part of this release.
### Method β bf16 LoRA continued pretraining
Raw-code continued pretraining (full-sequence causal-LM loss, no instruction pairs).
- **LoRA:** r=32, alpha=64, dropout=0.05, applied to all Qwen3.5 hybrid projections β full attention (`q/k/v/o_proj`, 8/32 layers), Gated-DeltaNet (`in_proj_qkv`, `in_proj_z`, `in_proj_b`, `in_proj_a`, `out_proj`, 24/32 layers), and FFN (`gate/up/down_proj`, all layers). `task_type=CAUSAL_LM`.
- **Optimizer/schedule:** `adamw_torch`, lr=1e-4, cosine, warmup_ratio=0.03, max_grad_norm=1.0, 1 epoch.
- **Batching:** per-device batch 4 Γ grad-accum 8 = effective batch 32, `max_length=2048` with `packing_strategy="wrapped"`, 4254 steps, ~15.5 h.
- **Precision/memory:** `bf16=True`, `gradient_checkpointing=True` (`use_reentrant=False`), `attn_implementation="sdpa"`, `optim="adamw_torch"` (no bitsandbytes). `PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True`.
- **Loss:** full-sequence causal-LM on packed raw code (correct for continued pretraining β no instruction/response pairs to mask).
- **Merge:** `merge_and_unload(safe_merge=True)` into the bf16 base β standalone safetensors. `save_peft_format=False` (critical β otherwise the adapter re-attaches on reload).
### Training result
| | |
|---|---|
| Steps | 4,254 (1 epoch) |
| Wall time | ~15.5 h |
| Train loss (final) | 0.4082 |
| Loss curve | 0.7336 (step 10) β 0.3318 (final) |
| Mean token accuracy | 0.8393 (step 10) β 0.9167 (final) |
| Tokens seen | ~2.79e8 |
### Training data
| | |
|---|---|
| Files | 84,925 unique (sha256-deduped; 206,707 duplicates removed; 2.07M minified files skipped) |
| Size | 803.2 MB |
| Tokens | ~211M (est. chars/4) |
| Format | `{"text": <redacted file content>}` β TRL `dataset_text_field="text"` |
By language (files): Java 26,335 Β· C# 19,048 Β· PHP 10,969 Β· LiveScript 7,457 Β· ActionScript 3,801 Β· Python 3,023 Β· JavaScript 2,646 Β· XML 2,569 Β· HTML 2,023 Β· CSS 1,470 Β· Rust 1,442 Β· C 1,103 Β· TypeScript 644 Β· C++ 517 Β· SQL 494 Β· VB 362 Β· JSON 351 Β· + Markdown/Gradle/YAML/Scala/Lua.
Sources: 123 Quackster Habbo emulator/tooling repos (incl. private: HorusClient, Kurkku, Aleeda, Icarus variants, cappo-emu, β¦), `ntuative/RELEASE63β¦`, `deklol/Shockless`, plus deeply-nested Beta-archive extractions (Debbo, BloodLine, Chocohotel, uberEmu, etc.) β 497 archives / 30 GB unpacked. `.sql` DB dumps (148 MB) are included for now and may be dropped in a later revision.
---
## Intended use & limitations
**Intended:** code completion / Q&A for Habbo server-emulator and retro-client development β packet handling, room/item state, CMS schemas, SWF/DIR reverse engineering, Shockwave Lingo, ActionScript 3 client internals.
**Not intended:** general-purpose chat, math, or non-Habbo code generation. This is a *continued-pretraining* of an instruct model on domain code; it is not a general assistant and was not aligned for safety/RLHF beyond what the base model already had. (Note: because the base here is an **instruct** model and the fine-tune is raw-code continued pretraining with no chat formatting, some of the base's chat alignment is expected to erode β this is a domain code model, not a conversational one.)
**Limitations:**
- ~9B parameters β strong on domain pattern-completion; weaker than larger models on multi-file reasoning.
---
## License & data provenance
- **Base model:** `Qwen/Qwen3.5-9B` β **Apache-2.0**. Fine-tuning and redistribution permitted with attribution. β
- **This fine-tune (weights):** released under **Apache-2.0** *conditional on the data licensing below*. The LoRA adapter is small and derivative; the merged model inherits both base and data obligations.
- **Training data:** mixed provenance β
- Author's own repos (fine).
- **GPL / various third-party emulators** (PHPRetro/Yifan Lu, uberEmu/Meth0d, Holograph, Icarus, etc.) β GPL-derivative debate applies; a model trained on GPL source is arguably a derivative work.
## Redaction
Secrets are scrubbed from all training content before tokenisation (replaced with `[REDACTED]`). No known credentials enter the weights. The released weights and tokenizer/config files were scanned for tokens, API keys, IPs, hostnames, and absolute paths before upload β none found.
## Citation
If this model is useful, cite the base and this fine-tune:
```bibtex
@misc{fusellm-9b,
title = {FuseLLM-9B: a Habbo ecosystem code model},
note = {bf16 LoRA continued pretraining of Qwen3.5-9B's text LM},
year = {2026},
}
``` |