mirror of
https://github.com/datalab-to/chandra.git
synced 2025-11-29 08:33:13 +00:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ad6508fbc3 | ||
|
|
2e455aeb2c |
@@ -73,6 +73,8 @@ 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
|
||||
|
||||
@@ -74,7 +74,7 @@ def load_model():
|
||||
"device_map": device_map,
|
||||
}
|
||||
if settings.TORCH_ATTN:
|
||||
kwargs["attn_implementation"] = settings.TORCH_ATTN_IMPLEMENTATION
|
||||
kwargs["attn_implementation"] = settings.TORCH_ATTN
|
||||
|
||||
model = Qwen3VLForConditionalGeneration.from_pretrained(
|
||||
settings.MODEL_CHECKPOINT, **kwargs
|
||||
|
||||
@@ -17,8 +17,6 @@ def main():
|
||||
"-v",
|
||||
f"{os.path.expanduser('~')}/.cache/huggingface:/root/.cache/huggingface",
|
||||
"--env",
|
||||
f"HUGGING_FACE_HUB_TOKEN={os.getenv('HF_TOKEN')}",
|
||||
"--env",
|
||||
"VLLM_ATTENTION_BACKEND=TORCH_SDPA",
|
||||
"-p",
|
||||
"8000:8000",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[project]
|
||||
name = "chandra-ocr"
|
||||
version = "0.1.2"
|
||||
version = "0.1.4"
|
||||
description = "OCR model that converts documents to markdown, HTML, or JSON."
|
||||
readme = "README.md"
|
||||
requires-python = ">=3.10"
|
||||
|
||||
Reference in New Issue
Block a user