Instructions to use audreyt/nemotron-cascade-2-attn-repeat-L5-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use audreyt/nemotron-cascade-2-attn-repeat-L5-GGUF with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="audreyt/nemotron-cascade-2-attn-repeat-L5-GGUF", filename="nemotron-cascade-2-attn-repeat-L5-Q4_K_M.gguf", )
output = llm( "Once upon a time,", max_tokens=512, echo=True ) print(output)
- Notebooks
- Google Colab
- Kaggle
- Local Apps
- llama.cpp
How to use audreyt/nemotron-cascade-2-attn-repeat-L5-GGUF with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf audreyt/nemotron-cascade-2-attn-repeat-L5-GGUF:Q4_K_M # Run inference directly in the terminal: llama-cli -hf audreyt/nemotron-cascade-2-attn-repeat-L5-GGUF:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf audreyt/nemotron-cascade-2-attn-repeat-L5-GGUF:Q4_K_M # Run inference directly in the terminal: llama-cli -hf audreyt/nemotron-cascade-2-attn-repeat-L5-GGUF:Q4_K_M
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf audreyt/nemotron-cascade-2-attn-repeat-L5-GGUF:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf audreyt/nemotron-cascade-2-attn-repeat-L5-GGUF:Q4_K_M
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf audreyt/nemotron-cascade-2-attn-repeat-L5-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf audreyt/nemotron-cascade-2-attn-repeat-L5-GGUF:Q4_K_M
Use Docker
docker model run hf.co/audreyt/nemotron-cascade-2-attn-repeat-L5-GGUF:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use audreyt/nemotron-cascade-2-attn-repeat-L5-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "audreyt/nemotron-cascade-2-attn-repeat-L5-GGUF" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "audreyt/nemotron-cascade-2-attn-repeat-L5-GGUF", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/audreyt/nemotron-cascade-2-attn-repeat-L5-GGUF:Q4_K_M
- Ollama
How to use audreyt/nemotron-cascade-2-attn-repeat-L5-GGUF with Ollama:
ollama run hf.co/audreyt/nemotron-cascade-2-attn-repeat-L5-GGUF:Q4_K_M
- Unsloth Studio new
How to use audreyt/nemotron-cascade-2-attn-repeat-L5-GGUF with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for audreyt/nemotron-cascade-2-attn-repeat-L5-GGUF to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for audreyt/nemotron-cascade-2-attn-repeat-L5-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for audreyt/nemotron-cascade-2-attn-repeat-L5-GGUF to start chatting
- Docker Model Runner
How to use audreyt/nemotron-cascade-2-attn-repeat-L5-GGUF with Docker Model Runner:
docker model run hf.co/audreyt/nemotron-cascade-2-attn-repeat-L5-GGUF:Q4_K_M
- Lemonade
How to use audreyt/nemotron-cascade-2-attn-repeat-L5-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull audreyt/nemotron-cascade-2-attn-repeat-L5-GGUF:Q4_K_M
Run and chat with the model
lemonade run user.nemotron-cascade-2-attn-repeat-L5-GGUF-Q4_K_M
List all available models
lemonade list
Upload README.md with huggingface_hub
Browse files
README.md
ADDED
|
@@ -0,0 +1,93 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: other
|
| 3 |
+
license_name: nvidia-open-model-license
|
| 4 |
+
license_link: https://www.nvidia.com/en-us/agreements/enterprise-software/nvidia-open-model-license/
|
| 5 |
+
base_model: nvidia/Nemotron-Cascade-2-30B-A3B
|
| 6 |
+
tags:
|
| 7 |
+
- nemotron
|
| 8 |
+
- moe
|
| 9 |
+
- mamba
|
| 10 |
+
- gguf
|
| 11 |
+
- attn-repeat
|
| 12 |
+
- rys
|
| 13 |
+
quantized_by: audreyt
|
| 14 |
+
pipeline_tag: text-generation
|
| 15 |
+
---
|
| 16 |
+
|
| 17 |
+
# Nemotron-Cascade-2-30B-A3B with Attention Repeat (Layer 5) - GGUF Q4_K_M
|
| 18 |
+
|
| 19 |
+
A modified GGUF of [NVIDIA Nemotron-Cascade-2-30B-A3B](https://huggingface.co/nvidia/Nemotron-Cascade-2-30B-A3B) that applies the **RYS (Repeat Your Steps)** layer duplication technique from [shi3z/nemotron-cascade-2-attn-repeat-L5](https://huggingface.co/shi3z/nemotron-cascade-2-attn-repeat-L5), but in GGUF format for use with **ollama** and **llama.cpp**.
|
| 20 |
+
|
| 21 |
+
## What changed
|
| 22 |
+
|
| 23 |
+
Layer 5 (the first GQA Attention layer) is physically duplicated in the GGUF. The model goes from 52 to **53 layers**, with layers 5 and 6 being identical attention blocks. All subsequent layers are shifted by 1.
|
| 24 |
+
|
| 25 |
+
This is the GGUF equivalent of shi3z's `BlockRepeatWrapper` approach. No weights were modified -- only duplicated.
|
| 26 |
+
|
| 27 |
+
### Per-layer metadata
|
| 28 |
+
|
| 29 |
+
The GGUF includes correct 53-element per-layer arrays for `attention.head_count_kv` and `feed_forward_length`, so ollama correctly classifies each layer (Mamba2 / GQA Attention / MoE).
|
| 30 |
+
|
| 31 |
+
## Architecture
|
| 32 |
+
|
| 33 |
+
53 layers total (was 52):
|
| 34 |
+
- **Mamba-2**: 23 layers (SSM-based, sequential)
|
| 35 |
+
- **MoE**: 23 layers (128 routed experts + 1 shared, top-6)
|
| 36 |
+
- **GQA Attention**: **7 layers** (was 6) at positions 5, **6**, 13, 20, 27, 34, 43
|
| 37 |
+
|
| 38 |
+
Parameters: 31.6B total, ~3B active per token. Quantization: Q4_K_M.
|
| 39 |
+
|
| 40 |
+
## Performance
|
| 41 |
+
|
| 42 |
+
Benchmarked on NVIDIA DGX Spark (GB10 Blackwell, 120GB unified LPDDR5X):
|
| 43 |
+
|
| 44 |
+
| Metric | Base cascade-2 | attn-repeat-L5 |
|
| 45 |
+
|--------|---------------|-----------------|
|
| 46 |
+
| Generation speed | 74.5 tok/s | 62.5 tok/s |
|
| 47 |
+
| Prompt eval | 81.7 tok/s | 299.0 tok/s |
|
| 48 |
+
| Model size | 23 GB | 22.6 GB |
|
| 49 |
+
| VRAM loaded | 26 GB | 27 GB |
|
| 50 |
+
|
| 51 |
+
~16% slower generation, ~3.7x faster prompt processing. Per shi3z's benchmarks, +6.7 percentage points on BBH-style reasoning.
|
| 52 |
+
|
| 53 |
+
## Usage with ollama
|
| 54 |
+
|
| 55 |
+
```bash
|
| 56 |
+
# Download and create model
|
| 57 |
+
ollama create nemotron-cascade-2-attn-repeat -f Modelfile
|
| 58 |
+
|
| 59 |
+
# Run
|
| 60 |
+
ollama run nemotron-cascade-2-attn-repeat "Hello!"
|
| 61 |
+
```
|
| 62 |
+
|
| 63 |
+
**Modelfile:**
|
| 64 |
+
```
|
| 65 |
+
FROM nemotron-cascade-2-attn-repeat-L5-Q4_K_M.gguf
|
| 66 |
+
TEMPLATE {{ .Prompt }}
|
| 67 |
+
RENDERER nemotron-3-nano
|
| 68 |
+
PARSER nemotron-3-nano
|
| 69 |
+
PARAMETER temperature 1
|
| 70 |
+
PARAMETER top_p 0.95
|
| 71 |
+
```
|
| 72 |
+
|
| 73 |
+
## How this GGUF was built
|
| 74 |
+
|
| 75 |
+
The GGUF was produced by a Python script that:
|
| 76 |
+
|
| 77 |
+
1. Reads the original `nemotron-cascade-2` Q4_K_M GGUF from ollama
|
| 78 |
+
2. Duplicates all 5 tensors of block 5 (attn_q, attn_k, attn_v, attn_output, attn_norm) as block 6
|
| 79 |
+
3. Shifts all blocks >= 6 up by 1
|
| 80 |
+
4. Updates `block_count` from 52 to 53
|
| 81 |
+
5. Rebuilds the per-layer `attention.head_count_kv` and `feed_forward_length` arrays with the inserted entry
|
| 82 |
+
|
| 83 |
+
Source: built on DGX Spark running ollama 0.20.0, using gguf-py 0.18.0.
|
| 84 |
+
|
| 85 |
+
## Credits
|
| 86 |
+
|
| 87 |
+
- **NVIDIA** for [Nemotron-Cascade-2-30B-A3B](https://huggingface.co/nvidia/Nemotron-Cascade-2-30B-A3B)
|
| 88 |
+
- **shi3z** for the [attn-repeat-L5 discovery](https://huggingface.co/shi3z/nemotron-cascade-2-attn-repeat-L5) and RYS technique
|
| 89 |
+
- Built with assistance from Claude Code (Anthropic)
|
| 90 |
+
|
| 91 |
+
## License
|
| 92 |
+
|
| 93 |
+
NVIDIA Open Model License (inherited from base model).
|