Run this model with HF Jobs

Run Dev9124/EKA-1-INT8 on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.

Paste one of these prompts into your coding agent:

Fine-tune on my dataset

Use HF Jobs and TRL to fine-tune https://huggingface.co/Dev9124/EKA-1-INT8. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.

Run batch inference

Use HF Jobs to run batch inference with https://huggingface.co/Dev9124/EKA-1-INT8 on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.

Evaluate on a benchmark

Use HF Jobs to evaluate https://huggingface.co/Dev9124/EKA-1-INT8. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
EKA-1-INT8 / README.md
Dev9124's picture
Upload README.md with huggingface_hub
7c2316e verified
|
Raw History Blame Contribute Delete
5.08 kB
---
license: apache-2.0
base_model: soketlabs/EKA-1
base_model_relation: quantized
library_name: transformers
pipeline_tag: text-generation
tags:
- eka
- raslnet
- mamba2
- moe
- mla
- int8
- int8
- weight-only
---
# EKA-1 · INT8 (weight-only, W8A16)
This repository is a **8-bit weight-only quantized** build of
[`soketlabs/EKA-1`](https://huggingface.co/soketlabs/EKA-1) (RASLNet: Mamba-2 + latent MoE + MLA,
26.3B total / 3.6B active parameters, 64K context, 256K vocab).
Unlike GPTQ/AWQ/bitsandbytes builds, this checkpoint keeps the original EKA module graph and
stores every eligible `nn.Linear` as a packed integer tensor plus scales, decoded by the
`EkaQuantLinear` module shipped in `modeling_eka.py`. It loads with the model's own
`trust_remote_code`, no external quantization library.
## Quantization spec
| | |
|---|---|
| Scheme | symmetric weight-only, 8-bit |
| INT8 | per-output-channel scale (`amax/127`) |
| INT4 | group-wise, group size **64**, symmetric (`amax/7`), two nibbles per byte |
| Quantized | all `nn.Linear` in attention, Mamba projections, shared experts and the 23 × 128 routed experts |
| Kept BF16/FP32 | token embeddings, LM head (`output_layer`), router gate and `e_score_correction_bias` (FP32, required for routing), norms, Mamba `conv1d`/`A_log`/`D`/`dt_bias`, MLA norms |
| Size on disk | **27 GB** (BF16 base: 52.6 GB) |
| Dequantization | lazy, on first forward per module; VRAM then approaches the BF16 footprint |
## Files
```
config.json
configuration_eka.py
generation_config.json
modeling_eka.py # + EkaQuantLinear / replace_linear_with_quant
model-00001-of-00004.safetensors
model-00002-of-00004.safetensors
model-00003-of-00004.safetensors
model-00004-of-00004.safetensors
model.safetensors.index.json
tokenizer.json tokenizer.model tokenizer_config.json special_tokens_map.json
chat_template.jinja
README.md EKA-1_banner_light.svg eka_architecture.svg
```
`config.json` carries `eka_quantization: {"bits": 8, "group_size": 64, ...}`; `modeling_eka.py`
builds `EkaQuantLinear` layers only when that key is present, so the same code file also serves the
BF16 base model.
## Usage (tested)
Requires **transformers 5.10.0** — EKA's hybrid cache (`build_eka_cache`) is not compatible with
the 4.x cache API nor with 5.17's revised `Cache`/`ConvCache` protocol. Python 3.12, torch 2.13.
```python
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
repo = "Dev9124/EKA-1-INT8"
tok = AutoTokenizer.from_pretrained(repo, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(
repo, trust_remote_code=True, dtype=torch.bfloat16, device_map="auto"
).eval()
messages = [{"role": "user", "content": "What is 17*23? Answer with the number only."}]
inputs = tok.apply_chat_template(
messages, add_generation_prompt=True, return_tensors="pt", return_dict=True
).to(model.device)
with torch.no_grad():
out = model.generate(**inputs, max_new_tokens=128, do_sample=False)
print(tok.decode(out[0, inputs["input_ids"].shape[-1]:], skip_special_tokens=True))
```
Smoke-tested output (greedy, 16 tokens):
`Okay, let's see. I need to calculate 17 multiplied by 23.`
## Quantization fidelity vs BF16
Single forward pass, same 12-token chat prompt, last-position logits compared with the BF16
checkpoint on the same stack:
| Metric | INT8 | INT4 |
|---|---|---|
| cosine similarity (logits) | **0.99991** | **0.99623** |
| max abs logit delta | 1.375 | 14.969 |
| top-50 token overlap | 47 / 50 | 37 / 50 |
| argmax token | same as BF16 | same as BF16 |
This is a numerical sanity check, not a benchmark.
## Benchmarks
The base model card reports (BF16): GSM8K **92.0**, MMLU-Redux **80.5**, IFEval **72.6 / 80.2**
(prompt / instruction).
gBench (`gsm8k`, `mmlu_redux`, `ifeval`) was run on this box against a **different 8-bit build**
(vLLM online quantization: INT8 W8A16 routed experts + FP8 W8A8 linears), not against this exact
checkpoint:
| Suite | BF16 (model card) | 8-bit vLLM build (measured) |
|---|---|---|
| GSM8K | 92.0 | 68.23 strict / 81.35 flexible |
| MMLU-Redux | 80.5 | 61.39 |
| IFEval | 72.6 / 80.2 | 64.33 prompt-strict |
The BF16 baseline was not re-run on this harness, so the gap mixes quantization and harness
differences; it is **not** a like-for-like quantization-loss table. No evaluation of this INT8
checkpoint has been run yet.
## GGUF
No GGUF is provided. `EkaV1ForCausalLM` (RASLNet: Mamba-2 + latent MoE + MLA) has no
implementation in llama.cpp / ggml, so `convert_hf_to_gguf.py` rejects it
(`Model EkaV1ForCausalLM is not supported`) and Unsloth's exporter — which wraps the same
converter — cannot convert it either. A GGUF port needs a new `LLM_ARCH` (graph + kernels +
tensor mapping), not just a conversion script.
## Provenance
- Base: `soketlabs/EKA-1` @ `main`, 52.6 GB BF16 safetensors, Apache-2.0.
- Quantizer: in-repo `EkaQuantLinear` + `replace_linear_with_quant` (`modeling_eka.py`),
weight-only symmetric, no calibration data.
- Hardware used: 1 × NVIDIA RTX PRO 6000 Blackwell (96 GB), CUDA 13.2.