Run this model with HF Jobs
Run naver-ai/ReadPoint-2B 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 to fine-tune https://huggingface.co/naver-ai/ReadPoint-2B. 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/naver-ai/ReadPoint-2B 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/naver-ai/ReadPoint-2B. 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.
Quantize for lower memory use
Use HF Jobs to create a 4-bit version of https://huggingface.co/naver-ai/ReadPoint-2B. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.
Instructions to use naver-ai/ReadPoint-2B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use naver-ai/ReadPoint-2B with PEFT:
Task type is invalid.
- Notebooks
- Google Colab
- Kaggle
fast_read: read the self-check without the box (box/check flags)
Browse filesFiles changed (2)
- README.md+7-6
- fast_read.py+15-9
21 unmodified lines2223242526272829303132333435363738396 unmodified lines464748495051525321 unmodified lines```bashpip install torch transformers peft pillow flash-linear-attention causal-conv1dpython fast_read.py --adapter naver-ai/ReadPoint-2B --image photo.jpg --target "the red mug" [--all] # --all: also the box and the self-check``````pythonfrom fast_read import FastReaderfrom PIL import Imagereader = FastReader("naver-ai/ReadPoint-2B")out = reader.read(Image.open("photo.jpg").convert("RGB"), "the red mug", full=True)out["point"] # (x, y), each 0..999 across the image width / heightout["dist"]["x"] # probability of each of the 1,000 values of x (also "y", "x1", "y1", "x2", "y2")out["box"] # (x1, y1, x2, y2), 0..999out["p_yes"] # self-check````fast_read.py` (one file) is a minimal version: plain transformers, one forward per read, replayed as a CUDA graph.6 unmodified lines| | read with `fast_read.py` (one forward) | written with `generate` ||---|---|---|| point (x and y) | 61.8 ms | 167 ms || point + box + self-check | 106.8 ms | |`generate`: plain transformers, the x and y answers written greedily as one batch. With the paper's engine the read takes40.3 ms, against 83.3 ms for writing the point in vLLM.21 unmodified lines2223242526272829303132333435363738396 unmodified lines46474849505152535421 unmodified lines```bashpip install torch transformers peft pillow flash-linear-attention causal-conv1dpython fast_read.py --adapter naver-ai/ReadPoint-2B --image photo.jpg --target "the red mug" --check # point + self-check; --box adds the box, --all both``````pythonfrom fast_read import FastReaderfrom PIL import Imagereader = FastReader("naver-ai/ReadPoint-2B")out = reader.read(Image.open("photo.jpg").convert("RGB"), "the red mug", check=True)out["point"] # (x, y), each 0..999 across the image width / heightout["dist"]["x"] # probability of each of the 1,000 values of x (also "y")out["p_yes"] # self-check# box=True also reads the box in the same forward: out["box"] = (x1, y1, x2, y2), out["dist"]["x1"] ... ["y2"]````fast_read.py` (one file) is a minimal version: plain transformers, one forward per read, replayed as a CUDA graph.6 unmodified lines| | read with `fast_read.py` (one forward) | written with `generate` ||---|---|---|| point (x and y) | 62.2 ms | 167 ms || point + self-check | 68.5 ms | || point + self-check + box | 105.6 ms | |`generate`: plain transformers, the x and y answers written greedily as one batch. With the paper's engine the read takes40.3 ms, against 83.3 ms for writing the point in vLLM.
12345676 unmodified lines1415161718192092 unmodified lines11311411511611711811912012145 unmodified lines167168169170171172173174175176177178179180181182183184185186# ReadPoint# Copyright (c) 2026-present NAVER Cloud Corp.# Released with the ReadPoint adapters under their license (CC BY-NC 4.0); the code release will carry its own license."""Minimal ReadPoint inference for Qwen3.5 adapters: ONE forward pass reads the point (and, optionally, the box and the self-check).Each coordinate answer is three digits, and every digit prefix the model could write is known in advance: per axis thequestion, 10 one-digit prefixes and 100 two-digit prefixes. They are packed with the image and "Point to <target>." into one6 unmodified lineshttps://github.com/naver-ai/ReadPoint (GPU resize, vision graph, Raspberry Pi read, evaluation), which comes with the code release.pip install torch transformers peft pillow flash-linear-attention causal-conv1dpython fast_read.py --image cat.jpg --target "the cat's left ear" [--adapter naver-ai/ReadPoint-0.8B] [--all]"""import argparse, json, os, timeimport numpy as np92 unmodified linesg.replay(); return out@torch.no_grad()def read(self, image, target, full=False):"""One forward (full=True also reads the box edges and the self-check, still in the same forward). Sequence = [prefix | tail of each question | 10 one-digit nodes per axis | 100 two-digit nodes per axis]."""names, check = (("x", "y", "x1", "y1", "x2", "y2"), True) if full else (("x", "y"), False)inp = self.proc(text=[self.prompt(target)], images=[image], return_tensors="pt").to(self.dev)P = inp["input_ids"][0]; Lp = len(P); qs = list(names) + (["check"] if check else [])ids, tails, par = [P], [], []45 unmodified linesap = argparse.ArgumentParser()ap.add_argument("--image", required=True); ap.add_argument("--target", required=True)ap.add_argument("--adapter", default="naver-ai/ReadPoint-0.8B"); ap.add_argument("--max-pixels", type=int, default=147456)ap.add_argument("--all", action="store_true", help="also read the box and the self-check (still one forward)")ap.add_argument("--repeat", type=int, default=20)a = ap.parse_args()R = FastReader(a.adapter, a.max_pixels); img = Image.open(a.image).convert("RGB"); W, H = img.sizedef timed(f):f(); f(); ts = []for _ in range(a.repeat):torch.cuda.synchronize(); t = time.perf_counter(); out = f(); torch.cuda.synchronize(); ts.append(1000 * (time.perf_counter() - t))return out, float(np.median(ts))res, ms = timed(lambda: R.read(img, a.target, full=a.all))x, y = res["point"]print(f"point ({x:03d}, {y:03d}) /1000 = ({x * W / 1000:.0f}, {y * H / 1000:.0f}) px")if a.all:print(f"box {tuple(res['box'])} /1000"); print(f"P(yes) {res['p_yes']:.3f} (self-check: can it point precisely at this resolution?)")print(f"read {ms:.1f} ms (one forward, image included; full distributions over 000..999)")if __name__ == "__main__":12345676 unmodified lines1415161718192092 unmodified lines11311411511611711811912012112212312445 unmodified lines170171172173174175176177178179180181182183184185186187188189190191192# ReadPoint# Copyright (c) 2026-present NAVER Cloud Corp.# Released with the ReadPoint adapters under their license (CC BY-NC 4.0); the code release will carry its own license."""Minimal ReadPoint inference for Qwen3.5 adapters: ONE forward pass reads the point (and, optionally, the self-check and the box).Each coordinate answer is three digits, and every digit prefix the model could write is known in advance: per axis thequestion, 10 one-digit prefixes and 100 two-digit prefixes. They are packed with the image and "Point to <target>." into one6 unmodified lineshttps://github.com/naver-ai/ReadPoint (GPU resize, vision graph, Raspberry Pi read, evaluation), which comes with the code release.pip install torch transformers peft pillow flash-linear-attention causal-conv1dpython fast_read.py --image cat.jpg --target "the cat's left ear" --check [--box] [--adapter naver-ai/ReadPoint-0.8B]"""import argparse, json, os, timeimport numpy as np92 unmodified linesg.replay(); return out@torch.no_grad()def read(self, image, target, full=False, box=None, check=None):"""One forward. box=True also reads the four box edges, check=True the self-check, both in the same forward; each is its ownbranch of the prompt, so the self-check does not need the box. box / check left as None follow full (full=True = both).Sequence = [prefix | tail of each question | 10 one-digit nodes per axis | 100 two-digit nodes per axis]."""box = full if box is None else box; check = full if check is None else checknames = ("x", "y") + (("x1", "y1", "x2", "y2") if box else ())inp = self.proc(text=[self.prompt(target)], images=[image], return_tensors="pt").to(self.dev)P = inp["input_ids"][0]; Lp = len(P); qs = list(names) + (["check"] if check else [])ids, tails, par = [P], [], []45 unmodified linesap = argparse.ArgumentParser()ap.add_argument("--image", required=True); ap.add_argument("--target", required=True)ap.add_argument("--adapter", default="naver-ai/ReadPoint-0.8B"); ap.add_argument("--max-pixels", type=int, default=147456)ap.add_argument("--check", action="store_true", help="also read the self-check (still one forward)")ap.add_argument("--box", action="store_true", help="also read the box (still one forward)")ap.add_argument("--all", action="store_true", help="--box and --check")ap.add_argument("--repeat", type=int, default=20)a = ap.parse_args()R = FastReader(a.adapter, a.max_pixels); img = Image.open(a.image).convert("RGB"); W, H = img.sizebox, check = a.box or a.all, a.check or a.alldef timed(f):f(); f(); ts = []for _ in range(a.repeat):torch.cuda.synchronize(); t = time.perf_counter(); out = f(); torch.cuda.synchronize(); ts.append(1000 * (time.perf_counter() - t))return out, float(np.median(ts))res, ms = timed(lambda: R.read(img, a.target, box=box, check=check))x, y = res["point"]print(f"point ({x:03d}, {y:03d}) /1000 = ({x * W / 1000:.0f}, {y * H / 1000:.0f}) px")if "box" in res: print(f"box {tuple(res['box'])} /1000")if "p_yes" in res: print(f"P(yes) {res['p_yes']:.3f} (self-check: can it point precisely at this resolution?)")print(f"read {ms:.1f} ms (one forward, image included; full distributions over 000..999)")if __name__ == "__main__":
README.md+7-6
fast_read.py+15-9