Text Generation
Transformers
Safetensors
eka_v1
eka
raslnet
mamba2
Mixture of Experts
mla
int4
weight-only
conversational
custom_code
8-bit precision
Run this model with HF Jobs
Run Dev9124/EKA-1-INT4 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-INT4. 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-INT4 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-INT4. 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.
Instructions to use Dev9124/EKA-1-INT4 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Dev9124/EKA-1-INT4 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Dev9124/EKA-1-INT4", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("Dev9124/EKA-1-INT4", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Dev9124/EKA-1-INT4 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Dev9124/EKA-1-INT4" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Dev9124/EKA-1-INT4", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Dev9124/EKA-1-INT4
- SGLang
How to use Dev9124/EKA-1-INT4 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 "Dev9124/EKA-1-INT4" \ --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": "Dev9124/EKA-1-INT4", "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 "Dev9124/EKA-1-INT4" \ --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": "Dev9124/EKA-1-INT4", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Dev9124/EKA-1-INT4 with Docker Model Runner:
docker model run hf.co/Dev9124/EKA-1-INT4
|
Download README.md from Dev9124/EKA-1-INT4: direct link, hf CLI and curl.
- Browser
- Download file 5.23 kB
-
https://huggingface.co/Dev9124/EKA-1-INT4/resolve/main/README.md
- Command line
-
hf download hf://Dev9124/EKA-1-INT4/README.md
-
curl -L -o README.md https://huggingface.co/Dev9124/EKA-1-INT4/resolve/main/README.md
5.23 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 | |
| - int4 | |
| - int4 | |
| - weight-only | |
| # EKA-1 · INT4 (weight-only, W4A16 g64) | |
| This repository is a **4-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, 4-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 | **16 GB** (BF16 base: 52.6 GB) | | |
| | Dequantization | lazy, on first forward per module; VRAM then approaches the BF16 footprint | | |
| > **Hub metadata:** the parameter counter shows ~14.5B because packed `uint4` tensors store two weights per byte; the model has **26.3B** parameters (24.2B of them in 4-bit). | |
| ## Files | |
| ``` | |
| config.json | |
| configuration_eka.py | |
| generation_config.json | |
| modeling_eka.py # + EkaQuantLinear / replace_linear_with_quant | |
| model-00001-of-00003.safetensors | |
| model-00002-of-00003.safetensors | |
| model-00003-of-00003.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": 4, "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-INT4" | |
| 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 INT4 | |
| 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. | |