FuseLLM-9B / README.md
h4bbo's picture
Upload folder using huggingface_hub
f352fd6 verified
|
Raw
History Blame Contribute Delete
9.35 kB
metadata
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)

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)

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:

@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},
}