---
title: DeepSeek-V4-Flash-REAP50-Security
canonical_url: "https://www.modelscope.cn/models/czf666/DeepSeek-V4-Flash-REAP50-Security"
md_url: "https://www.modelscope.cn/models/czf666/DeepSeek-V4-Flash-REAP50-Security.md"
repository: czf666/DeepSeek-V4-Flash-REAP50-Security
chinese_name: "DeepSeek V4 Flash REAP50 Security Block Cache"
last_updated: 2026-05-17
license: other
pipeline_tag: text-generation
tasks:
  - text-generation
model_type:
  - deepseek_v4
architectures:
  - DeepseekV4ForCausalLM
parameters: 80.9B
tensor_type:
  - F8_E8M0
  - I8
  - I32
  - F32
  - F8_E4M3
  - BF16
library_name:
  - safetensors
  - pytorch
frameworks:
  - pytorch
downloads: 84
stars: 0
tags:
  - deepseek
  - moe
  - pruning
  - reap
  - block-cache
  - security
---

# DeepSeek-V4-Flash-REAP50-Security

> DeepSeek-V4-Flash-REAP50-Security - czf666 在 ModelScope 开源的模型。DeepSeek-V4-Flash REAP50 Block Cache

czf666/DeepSeek-V4-Flash-REAP50-Security 是 ModelScope 魔搭社区上的 80.9B 参数text-generation模型，采用 other 许可。

- **Repository**: czf666/DeepSeek-V4-Flash-REAP50-Security
- **License**: other
- **Tasks**: text-generation
- **Parameters**: 80.9B
- **Tags**: deepseek, moe, pruning, reap, block-cache, security
- **Downloads**: 84
- **Stars**: 0
- **Last updated**: 2026-05-17

Source: https://www.modelscope.cn/models/czf666/DeepSeek-V4-Flash-REAP50-Security

---

# DeepSeek-V4-Flash REAP50 Block Cache

This repository is a **materialized REAP-style expert-pruned block cache** for
`deepseek-ai/DeepSeek-V4-Flash`.

It is **not** a standard Hugging Face `transformers` checkpoint. The routed MoE
experts are pruned and remapped per layer, then stored in 4-layer block shards so
local streaming loaders can run quality probes without repeatedly scanning the
original 149GB checkpoint.

## What Is Included

- `global.safetensors`: non-layer global tensors such as embeddings, output head,
  final norm, and Hyper-Connection head tensors.
- `blocks/block-*.safetensors`: pruned/remapped layer blocks.
- `cache_index.json`: block manifest, per-layer expert counts, REAP plan metadata,
  and kept expert IDs.
- Tokenizer/config/inference side files copied from the original V4-Flash
  checkpoint for reproducibility.

## Pruning Plan

- Method: REAP-like score from calibration statistics:
  `gate_value * expert_output_norm`
- Score key: `reap_score_sum`
- Retention: 50% routed expert slots
- Total routed expert slots: `5504`
- Average routed experts per layer: `128`
- Layer floors: `64` experts for the first 3 hash-routed layers, `16` experts
  elsewhere before global top-k fill
- Score coverage on calibration data: about `94.9%`
- MTP tensors are not included in the block cache.

Per-layer routed expert counts:

```text
[173, 86, 134, 80, 68, 67, 100, 89, 97, 89, 88, 87, 90, 79, 84,
 89, 106, 134, 144, 133, 182, 159, 179, 129, 126, 111, 132, 123,
 132, 138, 144, 155, 137, 136, 152, 163, 147, 150, 155, 197,
 174, 176, 190]
```

## Local Loader

This cache was produced and tested with custom local scripts:

- `materialize_reap_block_cache.py`
- `block_cached_prefill.py`
- `run_block_cache_security_smoke.py`
- `run_block_cache_forced_choice.py`

The loader reads `cache_index.json`, opens each block sequentially, constructs
one layer at a time on GPU, and dequantizes the V4 `attn.wo_a` FP8 tensor at
load time.

## Smoke Test

Forced-choice defensive security smoke test on 10 prompts:

```text
correct=10/10
elapsed_sec=754.57
```

This is a classification/probing result, not a full natural-language generation
benchmark.
