Qwen3.5-ocr-jp-2b / README.md
ebinan92's picture
Add flash-linear-attention + causal_conv1d (Qwen3.5 has 18 linear-attn layers); pin versions; area-based image cap
b87fa0c verified
|
Raw
History Blame
1.2 kB
metadata
title: Open Chandra OCR
emoji: 📄
colorFrom: blue
colorTo: gray
sdk: gradio
sdk_version: 5.50.0
app_file: app.py
pinned: false
license: apache-2.0
hardware: zero-a10g
models:
  - ebinan92/open-chandra-stage2-2b

Open Chandra OCR

Gradio app for hosting a custom Chandra-like OCR model on Hugging Face Spaces.

Configuration

Set these Space variables as needed:

  • MODEL_ID: Hugging Face model repo or local model path. Defaults to ebinan92/open-chandra-stage2-2b.
  • HF_TOKEN: required Space Secret for private models (read scope).
  • MAX_IMAGE_PIXELS: area-based image cap (px²). Defaults to 2359296 (1536²) ≈ 2300 visual tokens — matches the chandra-ocr-2 reference Space for ZeroGPU-friendly latency.
  • PDF_DPI: PDF render DPI. Defaults to 180.
  • CONCURRENCY_LIMIT: Gradio queue concurrency. Defaults to 1.

Hardware: ZeroGPU (hardware: zero-a10g). Inference uses HF transformers + flash-linear-attention (Qwen3.5 has 18 linear-attention layers; without optimized CUDA kernels they fall back to a 5–10x slower Python path). Runs inside @spaces.GPU(duration=180). Expect ~60–120s/page.