Run this model with HF Jobs

Run OpenTensorLab/OCRia-1-W4A16-AutoRound on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.

Paste one of these prompts into your coding agent:

Fine-tune on my dataset

Use HF Jobs and TRL to fine-tune https://huggingface.co/OpenTensorLab/OCRia-1-W4A16-AutoRound. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.

Run batch inference

Use HF Jobs to run batch inference with https://huggingface.co/OpenTensorLab/OCRia-1-W4A16-AutoRound on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.

Evaluate on a benchmark

Use HF Jobs to evaluate https://huggingface.co/OpenTensorLab/OCRia-1-W4A16-AutoRound. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
OCRia-1-W4A16-AutoRound / tests /test_capture_contract.py
Vishva R
Update model weights, configs, and auxiliary files
90d9faa verified
Raw History Blame Contribute Delete
1.35 kB
# Copyright (c) 2026 LlamaIndex, Inc. All rights reserved.
# Licensed under the OCRia-1 Model and Code License (LICENSE at the root of this repository).
# This is not open-source software: see the license for permitted uses.
"""Reject malformed external sparse maps before they reach geometry/native code."""
import pytest
from parse_rl_utils.ocria_attention_grounding.api import FastLayout
@pytest.mark.parametrize(
"field,value",
[
("width", float("nan")),
("grid", [0, 2]),
("grid", [1.5, 2]),
("idx", [[-1]]),
("idx", [[4]]),
("idx", [[1.5]]),
("val", [[float("nan")]]),
("val", [[-1.0]]),
("val", [[]]),
("has", []),
],
)
def test_malformed_capture_is_rejected_before_grounding(
field: str, value: object
) -> None:
capture = {
"width": 100,
"height": 100,
"grid": [2, 2],
"sparse_maps": {"idx": [[0]], "val": [[1.0]], "has": [True]},
}
if field in ("width", "grid"):
capture[field] = value
else:
capture["sparse_maps"][field] = value
backend = FastLayout.__new__(FastLayout)
backend.words = backend.pictures = backend.regions = backend.tables = (
backend.peaks
) = None
with pytest.raises(ValueError):
backend(answer="word", attention=capture)