玩模型开放模型 · 清晰来源 · 自主选择
返回模型目录
AEON-7 /

Gemma-4-E4B-DECKARD-HERETIC-Uncensored-NVFP4

HF 源站

AEON-7/Gemma-4-E4B-DECKARD-HERETIC-Uncensored-NVFP4 is an uncensored open-source model hosted on Hugging Face.

Text GenerationvLLMsafetensorsEnglishLicense: gemma31Btransformersgemma4image-text-to-text4-bitaarch64abliteratedaeonaeon-7agenticarm64awqblackwellchatchunked-prefillcodingconversationaldeckarddgx-sparkdraftere4beagleflashinfer-cutlassfp4fp8-kv-cachefunction-callinggb10gemma-4googlegpugrace-blackwellhereticinstructlong-contextmodeloptmultimodalnative-fp4nvfp4nvidiaopenai-apiopenai-compatibleprefix-cachingproduction-readyquantizedreasoningrefusal-removedsm_121aspeculative-decodingthinkingtool-callinguncensoredunfilteredvisionvision-languageweight-quantization
README.md说明 / 使用方法

license: gemma library_name: transformers pipeline_tag: text-generation base_model: DavidAU/gemma-4-31B-it-The-DECKARD-HERETIC-UNCENSORED-Thinking tags:

  • 4-bit
  • aarch64
  • abliterated
  • aeon
  • aeon-7
  • agentic
  • arm64
  • awq
  • blackwell
  • chat
  • chunked-prefill
  • coding
  • conversational
  • deckard
  • dgx-spark
  • drafter
  • e4b
  • eagle
  • english
  • flashinfer-cutlass
  • fp4
  • fp8-kv-cache
  • function-calling
  • gb10
  • gemma
  • gemma-4
  • gemma4
  • google
  • gpu
  • grace-blackwell
  • heretic
  • instruct
  • long-context
  • modelopt
  • multimodal
  • native-fp4
  • nvfp4
  • nvidia
  • openai-api
  • openai-compatible
  • prefix-caching
  • production-ready
  • quantized
  • reasoning
  • refusal-removed
  • safetensors
  • sm_121a
  • speculative-decoding
  • text-generation
  • thinking
  • tool-calling
  • uncensored
  • unfiltered
  • vision
  • vision-language
  • vllm
  • weight-quantization model_type: gemma4 quantization: nvfp4 language:
  • en

Gemma 4 E4B DECKARD HERETIC Uncensored NVFP4

EAGLE speculative decoding drafter for Gemma 4 31B DECKARD HERETIC Uncensored NVFP4.

A 42-layer E4B (EAGLE for Blackwell) model quantized to NVFP4 AWQ using NVIDIA ModelOpt 0.42.0. Designed for EAGLE-based speculative decoding on NVIDIA DGX Spark (GB10, SM 12.1) and other Blackwell GPUs.

Model Details

PropertyValue
ArchitectureGemma 4 (E4B EAGLE Drafter)
Target ModelAEON-7/Gemma-4-31B-it-DECKARD-HERETIC-Uncensored-NVFP4
Layers42 (35 sliding-window + 7 full-attention)
Hidden Size2560
Attention Heads8 (2 KV heads), head_dim=256, global_head_dim=512
Sliding Window512 tokens
Max Context131,072 tokens
QuantizationNVFP4 AWQ (ModelOpt 0.42.0)
Model Size9.6 GB
Vocabulary262,144 tokens

Performance (DGX Spark)

Benchmarked on NVIDIA DGX Spark (GB10, SM 12.1, 128 GB unified memory) with 31B DECKARD AWQ_FULL target + this E4B drafter. 5 speculative tokens, 300 max tokens per request.

ConcurrentAggregate tok/sPer-Request tok/sAvg Latency (300 tok)
17.68.939.4s
221.710.827.7s
442.710.728.1s

Zero errors across all test runs. Throughput scales linearly with concurrency.

Quick Start

1. Download both models

pip install -U huggingface-hub

# Target model (31B)
huggingface-cli download AEON-7/Gemma-4-31B-it-DECKARD-HERETIC-Uncensored-NVFP4 \
  --local-dir ~/models/deckard-31b

# This drafter model (E4B)
huggingface-cli download AEON-7/Gemma-4-E4B-DECKARD-HERETIC-Uncensored-NVFP4 \
  --local-dir ~/models/e4b-drafter

2. Get the patched vLLM files

Three patches are required for Gemma 4 speculative decoding. Download from the GitHub repo:

for f in eagle_patched.py serving_chat_patched.py modelopt_patched.py; do
  curl -LO https://raw.githubusercontent.com/AEON-7/Gemma-4-31B-DECKARD-HERETIC-Uncensored-NVFP4/main/$f
done

3. Launch with Docker Compose

services:
  vllm:
    image: ghcr.io/aeon-7/vllm-spark-gemma4-nvfp4-awq:latest
    container_name: vllm-deckard-31b-spec
    restart: unless-stopped
    network_mode: host
    volumes:
      - ~/models/deckard-31b:/models/deckard
      - ~/models/e4b-drafter:/models/e4b-drafter
      - ./modelopt_patched.py:/usr/local/lib/python3.12/dist-packages/vllm/model_executor/layers/quantization/modelopt.py
      - ./serving_chat_patched.py:/usr/local/lib/python3.12/dist-packages/vllm/entrypoints/openai/chat_completion/serving.py
      - ./eagle_patched.py:/usr/local/lib/python3.12/dist-packages/vllm/v1/spec_decode/eagle.py
    environment:
      - VLLM_TEST_FORCE_FP8_MARLIN=1
      - VLLM_MARLIN_USE_ATOMIC_ADD=1
      - VLLM_ALLOW_LONG_MAX_MODEL_LEN=1
      - TORCH_MATMUL_PRECISION=high
      - PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True
    command:
      - bash
      - -c
      - |
        exec vllm serve /models/deckard \
          --served-model-name deckard-31b \
          --quantization modelopt \
          --dtype auto \
          --kv-cache-dtype fp8 \
          --tensor-parallel-size 1 \
          --max-model-len 131072 \
          --max-num-seqs 4 \
          --gpu-memory-utilization 0.65 \
          --trust-remote-code \
          --host 0.0.0.0 --port 8000 \
          --enable-chunked-prefill \
          --enable-prefix-caching \
          --enable-auto-tool-choice \
          --tool-call-parser gemma4 \
          --reasoning-parser gemma4 \
          --speculative-config '{"method":"draft_model","model":"/models/e4b-drafter","num_speculative_tokens":5,"quantization":"modelopt"}'
    ipc: host
    deploy:
      resources:
        reservations:
          devices:
            - driver: nvidia
              count: all
              capabilities: [gpu]

On the DGX Spark's unified memory keep --gpu-memory-utilization at 0.6-0.7; above ~0.8 the shared CPU+GPU pool page-thrashes. With EAGLE speculative decoding the verify buffers are not counted by the fraction, so leave extra headroom (0.65 here). Discrete-VRAM GPUs can run higher.

4. Test

curl http://localhost:8000/v1/chat/completions \
  -H "Content-Type: application/json" \
  -d '{
    "model": "deckard-31b",
    "messages": [{"role": "user", "content": "Explain quantum entanglement."}],
    "max_tokens": 200
  }'

Required vLLM Patches

Three patches to vLLM 0.19.1 are required for speculative decoding with Gemma 4. All are available in the target model GitHub repo.

PatchWhat it fixes
eagle_patched.pyRemoves multimodal spec decode guard, adds Gemma4 model whitelist, supports multi-group KV cache (heterogeneous head_dim=256/512)
serving_chat_patched.pyFixes non-streaming reasoning parser — <|channel> tokens stripped by skip_special_tokens=True
modelopt_patched.pyNVFP4_AWQ quant_algo support, AWQ pre_quant_scale handling, FP8 NaN scrubbing

Heterogeneous Attention

This E4B drafter mirrors the Gemma 4 heterogeneous attention design:

  • 35 sliding-window layers — head_dim=256, window of 512 tokens, default RoPE (theta=10000)
  • 7 full-attention layers — head_dim=512, global attention, proportional RoPE (theta=1M, partial_rotary_factor=0.25)

This creates two distinct KV cache groups, handled by the eagle_patched.py multi-group KV cache fix.

Related Models

ModelTypeSizeLink
Gemma 4 31B DECKARD AWQ_FULL (target)Dense NVFP420.5 GBHuggingFace | GitHub
Gemma 4 31B DECKARD SVDQuantDense NVFP420.9 GBHuggingFace
SuperGemma4 26B MoEMoE NVFP415.3 GBHuggingFace
vLLM AWQ ContainerDocker—GHCR

License

This model inherits the Gemma license from Google.


☕ Support the work

If this release has been useful, tips are deeply appreciated — they go directly toward more compute, more models, and more open releases.

Ethereum L2s (Base, Arbitrum, Optimism, Polygon, etc.) and EVM-compatible tokens can be sent to the same Ethereum address.

HUGGING FACE

上游数据

HF 下载量97
HF 点赞量1

HF 下载量为源站最近 30 天统计,与本站点击分开。

SITE STATS

本站统计

下载点击—
请求数—
匿名去重—最近 7 天—

本站下载量记录按钮点击,不代表下载完成;短时连点会去重。

来源与版本

作者
AEON-7
最近更新
2026/07/15
最新创建
2026/04/13
HF 趋势
391
数据快照
2026/09/16
版本
未知
许可证
gemma