fix(vision): DeepSeek-OCR CLIP encoder parity is off the mlx-vlm reference on CUDA
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 45/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- rust
- Área
- computer-vision, testing-qa
Línea de trabajo
Start with tests/deepseekocr_encoder_parity.rs and its header reference script, ref_dsocr_enc2.py; run the CUDA parity test on GB10 and compare each CLIP layer with mlx-vlm, since the SAM output already matches. Check the CLIP path in src/vision/encoders/deepseekocr_clip.rs and the CUDA SAM-to-CLIP handoff. Determine whether Metal also fails, identify the root cause, and keep the existing tolerance while making make verify-test-cuda pass.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Problem
sam_and_clip_encoders_match_reference in tests/deepseekocr_encoder_parity.rs (gated on models/deepseek-ocr-4bit, vision weights bf16) fails on GB10 (spark-102, sm_121, CUDA) at tests/deepseekocr_encoder_parity.rs:88 with CLIP absmean 0.130644 off reference.
[SAM] shape=[1, 16, 16, 1024] absmean=0.04302
[CLIP] shape=[1, 257, 1024] absmean=0.13064 first4=[0.12695, -0.22852, -0.59375, -0.04102]
SAM passes (reference 0.04304, tol 0.002). CLIP's reference is 0.14356 with tol 0.005, so the gap is about 0.013 (roughly 9%), well outside bf16 drift.
It fails identically on main at the previous MLX pin (fc344c98, commit bb0c8b3b) and at the new pin 5a48f9cc (#3517), so it predates the pin bump. It surfaced during the #3517 GB10 gate (make verify-test-cuda). Not yet checked: the Metal result, and when it started on CUDA. The test file was last changed by #651 (initial) and #2682 (quantized vision parameter loading hardening).
Since SAM matches and CLIP does not, the gap is in the CLIP path (ClipEncoder::from_weights(&weights, "vision_model", ClipConfig::default(), 64, 4), src/vision/encoders/deepseekocr_clip.rs) or the SAM-to-CLIP handoff on CUDA.
cargo test -p mlxcel --features cuda --profile test-fast --test deepseekocr_encoder_parity -- --test-threads=1
Acceptance Criteria
- Determine whether the test passes on Metal (CUDA-only vs. both backends)
- Root cause found, by bisect or a per-layer diff against mlx-vlm using the reference script the test header names (
ref_dsocr_enc2.py) - Fixed so the test passes on GB10 with the existing tolerance; do not widen the tolerance without a diagnosed numeric reason
- The test passes in
make verify-test-cuda
- Lenguaje dominante
- Rust
- Estrellas
- 505
- Forks
- 81
- Merge medio
- 14 h 2 min
- PR fusionados (30 d)
- 448
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de lablup/mlxcel
-
area:core priority:high status:ready type:security
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día
-
priority:medium status:ready type:security
Dificultad 4/5 3-5 días Aptitud para principiantes 45/100
Los mantenedores suelen responder en 1 día
-
area:models modeltype:text priority:medium status:in-progress type:bug
Dificultad 4/5 3-5 días Aptitud para principiantes 57/100
Los mantenedores suelen responder en 1 día
-
area:models priority:low status:ready type:test
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
Los mantenedores suelen responder en 1 día
-
area:models modeltype:omni priority:medium status:ready type:bug
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
Los mantenedores suelen responder en 1 día
Todos los issues de lablup/mlxcel
Issues similares
-
psmux-resurrect: restoring a session with a numeric name puts its windows into the wrong session (`new-window -t 4` is read as window 4)Posiblemente ocupada @ealwanlee la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
psmux/psmux-plugins#47 ·
-
Link Checker ReportAbiertoautomated issue report
Dificultad 1/5 Menos de una hora Aptitud para principiantes 76/100
ratatui/awesome-ratatui#598 ·
Los mantenedores suelen responder en 1 día
-
release
Dificultad 1/5 Menos de una hora Aptitud para principiantes 75/100
github/gh-aw-mcpg#17603 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
C-Bug S-Needs-Triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
bevyengine/bevy#26718 ·
Los mantenedores suelen responder en 2 días