Run this model with HF Jobs

Run OpenTensorLab/OCRia-1-W4A16-GPTQ 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-GPTQ. 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-GPTQ 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-GPTQ. 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.
File size: 1,345 Bytes
947a738
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# 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)