Skip to content

oQ quantization: oq_calibration_data.json missing from package #374

@BukeLy

Description

@BukeLy

Bug

oq_calibration_data.json is referenced in omlx/oq.py (line 1312) but is not included in the installed package, causing calibration data loading to fail during oQ quantization.

Error

omlx.oq - WARNING - Built-in calibration failed: Built-in calibration data not found: 
/opt/homebrew/Cellar/omlx/HEAD-6cc709c/libexec/lib/python3.11/site-packages/omlx/oq_calibration_data.json, 
falling back to mlx-lm default

Expected behavior

oq_calibration_data.json should be shipped with the package (via package_data in pyproject.toml or MANIFEST.in).

Fallback also fails

The HuggingFace fallback datasets (bigcode/starcoderdata, uonlp/CulturaX) are gated and return 401 Unauthorized, so the entire calibration pipeline degrades to minimal built-in data:

omlx.oq - WARNING - Failed to load code dataset
omlx.oq - WARNING - Failed to load code_multilingual: No text loaded from code_multilingual, falling back to built-in

This means oQ quantization completes but with suboptimal calibration, potentially degrading model quality.

Steps to reproduce

  1. Install omlx via brew (brew install --HEAD jundot/omlx/omlx)
  2. Trigger oQ quantization via admin API
  3. Observe warnings about missing calibration data

Suggested fix

  1. Include oq_calibration_data.json in package_data / pyproject.toml so it ships with the package
  2. Consider a better fallback when HF gated datasets are inaccessible (e.g., non-gated dataset or bundled minimal calibration data that actually works)

Environment

  • omlx HEAD-6cc709c (installed via Homebrew)
  • macOS, Apple Silicon
  • Python 3.11

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions