2 Commits

Author SHA1 Message Date
Tarun Menta
eaa31d169d Fix missing setting 2025-10-21 11:13:26 -04:00
Vik Paruchuri
63c88d644d Fix attn impl 2025-10-21 11:01:02 -04:00
4 changed files with 4 additions and 6 deletions

View File

@@ -73,8 +73,6 @@ See full scores [below](#benchmark-table).
pip install chandra-ocr
```
If you're going to use the huggingface method, we also recommend installing [flash attention](https://github.com/Dao-AILab/flash-attention).
### From Source
```bash

View File

@@ -73,8 +73,8 @@ def load_model():
"dtype": settings.TORCH_DTYPE,
"device_map": device_map,
}
if settings.TORCH_ATTN:
kwargs["attn_implementation"] = settings.TORCH_ATTN
if settings.TORCH_ATTN_IMPLEMENTATION:
kwargs["attn_implementation"] = settings.TORCH_ATTN_IMPLEMENTATION
model = Qwen3VLForConditionalGeneration.from_pretrained(
settings.MODEL_CHECKPOINT, **kwargs

View File

@@ -13,7 +13,7 @@ class Settings(BaseSettings):
MODEL_CHECKPOINT: str = "datalab-to/chandra"
TORCH_DEVICE: str | None = None
MAX_OUTPUT_TOKENS: int = 8192
TORCH_ATTN: str | None = None
TORCH_ATTN_IMPLEMENTATION: str | None = None
# vLLM server settings
VLLM_API_KEY: str = "EMPTY"

View File

@@ -1,6 +1,6 @@
[project]
name = "chandra-ocr"
version = "0.1.3"
version = "0.1.2"
description = "OCR model that converts documents to markdown, HTML, or JSON."
readme = "README.md"
requires-python = ">=3.10"