# jasontitus/dsv41-loop-eval — AlpLab Radar Static Code Audit

- Ring: `trial`
- Category: `ai-models`
- Overall score: `3.1/5`
- Implementation check: `verified`
- Maturity: `early`
- Audited commit: `79fe76ef0130` (read-only; nothing from the repository was executed)
- Reviewed at: 2026-12-03T05:24:11Z
- Repository: https://github.com/jasontitus/dsv41-loop-eval
- Radar entry: https://radar.alplab.co/#repo/jasontitus/dsv41-loop-eval
- License: `MIT`
- Tags: `deepseek`, `vllm`, `lora`, `inference`, `cuda`, `apple-silicon`

## Summary

A vLLM plugin and platform-specific installers that add recurrent loop passes, LoRA adapters, and hidden-state contrast decoding to DeepSeek-V4.1-Flash.

## Implementation Check

README.md's CUDA plugin claim is implemented by vllm_loop/dsv41_loop/plugin.py `register` and `run_looped_layers`, with adapter loading in math_ops.py `load_loop_bundle`.

## When to Use

Pilot recurrent DeepSeek-V4.1 inference only on the documented high-memory CUDA or Apple Silicon environments. Do not expose the generated CUDA server publicly without access controls.

## Sub-scores

| Dimension | Score |
|---|---|
| quality | 3.5/5 |
| usability | 3.0/5 |
| reliability | 3.0/5 |
| security | 2.5/5 |
| integration | 3.5/5 |

## Code Evidence

- vllm_loop/dsv41_loop/plugin.py `run_looped_layers` executes prelude, repeated core passes, optional `loop_cd`, and coda layers.
- vllm_loop/dsv41_loop/plugin.py `register` patches vLLM DeepSeek-V4.1 model hooks and fails fast for incompatible cache and parallel settings.
- vllm_loop/dsv41_loop/math_ops.py `load_loop_bundle` and `entry_apply` load adapters and perform fp32 recurrent-state math.
- vllm_loop/tests/test_dsv41_loop_parity.py tests MLX parity, TP sharding, zero-gate identity, cache isolation, and mock loop behavior.
- install_cuda.sh verifies vLLM DeepSeek-V4.1 support and GPU-memory prerequisites before installing its plugin.

## Issues Found

- install_cuda.sh generates a vLLM server bound to `0.0.0.0` by default with no authentication option configured.
- install_cuda.sh:86 and install_mac.sh:143 extract remotely fetched archives without integrity verification.
- install_cuda.sh passes `--trust-remote-code` to vLLM by default.

## Key Risks

- Requires a nightly-capable vLLM environment and exceptionally large CUDA hardware or a 48 GB+ Apple Silicon Mac.
- No CI configuration is present, so test execution and compatibility with the stated vLLM version are unverified.
- Installer downloads release archives through `curl | tar` without checksum or signature verification.
- The plugin relies on private vLLM model internals and monkey patches, making it sensitive to upstream API changes.

## Reviewed Files

- `README.md`
- `vllm_loop/README.md`
- `vllm_loop/pyproject.toml`
- `vllm_loop/dsv41_loop/plugin.py`
- `vllm_loop/tests/test_dsv41_loop_parity.py`
- `vllm_loop/dsv41_loop/math_ops.py`
- `install_cuda.sh`
- `install_mac.sh`
