davanstrien HF Staff commited on
Commit
d0813ca
Β·
verified Β·
1 Parent(s): ef5328a

Sync from GitHub via hub-sync

Browse files
Files changed (1) hide show
  1. README.md +42 -27
README.md CHANGED
@@ -9,44 +9,59 @@ pinned: false
9
 
10
  # UV Scripts
11
 
12
- **Run ML workflows on GPU with a single command - no setup required**
13
 
14
- Self-contained Python scripts powered by [UV](https://docs.astral.sh/uv/guides/scripts/) and [HF Jobs](https://huggingface.co/docs/huggingface_hub/guides/jobs). Pick a task, copy the command, and you're running on cloud GPUs in seconds.
15
 
16
- ## Get Started
 
 
 
 
 
 
 
 
 
 
 
 
17
 
18
  ```bash
19
- hf jobs uv run --flavor l4x1 \
20
- https://huggingface.co/datasets/uv-scripts/ocr/raw/main/nanonets-ocr.py \
21
- your-images your-extracted-text
22
  ```
23
 
24
- One command, no setup. Works locally too with just `uv run`.
 
 
25
 
26
- ## Browse Scripts
27
 
28
- **Document Processing**
29
- - [ocr](https://huggingface.co/datasets/uv-scripts/ocr) - Extract text from images with VLMs (LaTeX, tables, forms, handwriting)
30
- - [dataset-creation](https://huggingface.co/datasets/uv-scripts/dataset-creation) - Create HF datasets from PDFs and local files (CPU only)
31
 
32
- **Computer Vision**
33
- - [sam3](https://huggingface.co/datasets/uv-scripts/sam3) - Zero-shot object detection with natural language prompts using SAM3
 
 
 
 
 
34
 
35
- **Text Generation & Classification**
36
- - [vllm](https://huggingface.co/datasets/uv-scripts/vllm) - High-performance GPU inference with vLLM (classification, VLM tasks)
37
- - [classification](https://huggingface.co/datasets/uv-scripts/classification) - Text classification with structured outputs and guaranteed valid labels
38
- - [openai-oss](https://huggingface.co/datasets/uv-scripts/openai-oss) - Generate responses using OpenAI's open-source reasoning models
39
- - [synthetic-data](https://huggingface.co/datasets/uv-scripts/synthetic-data) - Generate synthetic training data with chain-of-thought reasoning
40
 
41
- **Model Training**
42
- - [unsloth/jobs](https://huggingface.co/datasets/unsloth/jobs) - Fine-tune LLMs and VLMs with Unsloth (LFM2.5, Qwen3-VL, Gemma3, continued pretraining)
 
 
 
 
 
 
43
 
44
- **Analysis & Visualization**
45
- - [dataset-stats](https://huggingface.co/datasets/uv-scripts/dataset-stats) - Analyze dataset statistics with streaming and Polars (CPU only)
46
- - [build-atlas](https://huggingface.co/datasets/uv-scripts/build-atlas) - Generate interactive embedding visualizations with Apple's Atlas
47
 
48
- ## Learn More
49
 
50
- - [HF Jobs Documentation](https://huggingface.co/docs/hub/jobs) - run `hf jobs hardware` to see available GPUs and pricing
51
- - [Available GPU hardware](https://huggingface.co/docs/hub/en/spaces-gpus#hardware-specs)
52
- - [UV Script Documentation](https://docs.astral.sh/uv/guides/scripts/)
 
9
 
10
  # UV Scripts
11
 
12
+ **Run a data or ML task over a Hugging Face dataset in one command β€” for humans and agents.**
13
 
14
+ Each recipe is a single self-contained [UV script](https://docs.astral.sh/uv/guides/scripts/): dependencies are declared inline, so you run it straight from a URL with no clone, no virtualenv, no `pip install`. Run it locally with `uv run` where you have the hardware, or hand it to [Hugging Face Jobs](https://huggingface.co/docs/hub/jobs) for a managed GPU. Most recipes read a Hub dataset and write a new one, so they chain into pipelines.
15
 
16
+ ## See every recipe (no GPU, no token)
17
+
18
+ The lowest-friction start β€” just [uv](https://docs.astral.sh/uv/getting-started/installation/), runs locally in seconds:
19
+
20
+ ```bash
21
+ uv run https://huggingface.co/datasets/uv-scripts/jobs-utils/raw/main/list-recipes.py
22
+ ```
23
+
24
+ It prints a runnable URL for every recipe in the org. Run any of them the same way: `uv run <url>` locally, or `hf jobs uv run <url>` on a GPU.
25
+
26
+ ## Run one for real
27
+
28
+ The flagship is **[OCR](https://huggingface.co/datasets/uv-scripts/ocr)** β€” turn an image dataset into text & structured data, 30+ models. On a managed GPU (no hardware of your own; pay-per-second):
29
 
30
  ```bash
31
+ hf jobs uv run --flavor l4x1 --secrets HF_TOKEN \
32
+ https://huggingface.co/datasets/uv-scripts/ocr/raw/main/glm-ocr.py \
33
+ davanstrien/ufo-ColPali your-username/ufo-ocr --max-samples 10
34
  ```
35
 
36
+ One command β†’ a new dataset with a `markdown` column.
37
+
38
+ ## For your coding agent
39
 
40
+ Recipes are built to be agent-driven β€” same `input output` arg order, runnable from a URL, self-describing headers. Two prompts to paste into Claude Code, Cursor, or similar:
41
 
42
+ **Try it now** β€” runs a real OCR job and hands back a dataset:
 
 
43
 
44
+ ```
45
+ Using uv-scripts, OCR a sample dataset on Hugging Face Jobs:
46
+ hf jobs uv run --flavor l4x1 --secrets HF_TOKEN \
47
+ https://huggingface.co/datasets/uv-scripts/ocr/raw/main/glm-ocr.py \
48
+ davanstrien/ufo-ColPali $MY_HF_USERNAME/ufo-ocr-test --max-samples 10
49
+ Then open the output dataset and show me the `markdown` column.
50
+ ```
51
 
52
+ **Put it to work** β€” when you need data for a task:
 
 
 
 
53
 
54
+ ```
55
+ I need a dataset for <my task>. uv-scripts has recipes that create, OCR,
56
+ transcribe, classify, deduplicate, and embed datasets on Hugging Face. List them:
57
+ uv run https://huggingface.co/datasets/uv-scripts/jobs-utils/raw/main/list-recipes.py
58
+ Pick the one that fits, read its script header for the arguments, and run it with:
59
+ hf jobs uv run --flavor l4x1 --secrets HF_TOKEN <script-url> INPUT_DATASET OUTPUT_DATASET
60
+ Each recipe reads a Hub dataset and writes a new one, so chain them as needed.
61
+ ```
62
 
63
+ Prefer a packaged setup? The cookbook ships an **agent skill** for discovering and running recipes β€” see the [GitHub repo](https://github.com/davanstrien/uv-scripts-for-ai). Hugging Face also ships an [`hf` CLI skill for agents](https://huggingface.co/docs/hub/agents-cli). _(We'll refine these prompts over time.)_
 
 
64
 
65
+ ## More
66
 
67
+ Every other recipe is in the list below β€” detection & segmentation, audio transcription, NER & classification, embeddings & atlas maps, batch LLM/VLM inference, synthetic data, and dataset creation. Or browse on **[GitHub](https://github.com/davanstrien/uv-scripts-for-ai)** Β· run `hf jobs hardware` for GPU flavors & pricing.