HuggingFaceFW/fineweb-edu
Viewer β’ Updated β’ 3.5B β’ 436k β’ 1.39k
Official model weights and configuration for Next-Concept Modeling (NCM v2): a hierarchical language model architecture combining Residual Vector Quantization (RVQ-4) in concept space with Semi-Autoregressive Surface Realization.
HuggingFaceFW/fineweb-eduyahma/alpaca-cleanedMeasured on a consumer NVIDIA GeForce RTX 5050 (8GB VRAM) with PyTorch bfloat16 and FlashAttention SDPA:
| Metric / Regime | Standard Transformer (GPT-2) | NCM v2 (Hierarchical) | NCM Advantage |
|---|---|---|---|
| Model Parameters | 124.48M (12 layers, $D=768$) | 101.88M (5 planner + 5 decoder) | 18.2% leaner |
| Train Throughput ($B=4, T=1024$) | 6,667 tok/s (7,055 MB) |
23,359 tok/s (3,233 MB) |
3.50x faster & 2.18x less VRAM |
| Train Throughput ($B=8, T=1024$) | 455 tok/s (13,063 MB β RAM paging) |
27,652 tok/s (5,583 MB) |
60.8x faster (zero VRAM spillover) |
| Single-Stream Inference ($B=1, 128 ext{ tok}$) | 67.1 tok/s (1,908 ms) |
122.4 tok/s (1,045 ms) |
1.82x faster latency |
| High-Batch Inference ($B=64, 8192 ext{ tok}$) | 3,840.2 tok/s | 7,357.2 tok/s (1,113 ms) |
1.92x higher throughput |
| High-Level Attention Complexity | $O(T^2) = 1,048,576$ pairs | $O((T/4)^2) = 65,536$ pairs | 16x fewer attention pairs |
Clone the official repository to run one-line inference with automatic checkpoint resolution:
git clone https://github.com/Kanz4kii/Next-Concept-Modeling.git
cd Next-Concept-Modeling
pip install -r requirements.txt
python generate.py \
--hf-repo Kanz4kii/Next-Concept-Modeling \
--chat \
--prompt "What are three key principles of effective software engineering?" \
--max-new-tokens 128 \
--token-temperature 0.5 \
--min-p 0.05 \
--repetition-penalty 1.25
import torch
from model import NCMModel
from interfaces import ModelArgs
# Loads model directly from Hugging Face Hub checkpoint
model = NCMModel.from_safetensors("model.safetensors", args=ModelArgs.from_json("config.json"))
model.to("cuda" if torch.cuda.is_available() else "cpu")
@software{{ncm_v2_2026,
author = {{Kanz4kii}},
title = {{Next-Concept Modeling (NCM v2): Semi-Autoregressive Hierarchical Language Modeling}},
year = {{2026}},
publisher = {{Hugging Face & GitHub}},
url = {{https://huggingface.co/Kanz4kii/Next-Concept-Modeling}}
}}