Run this model with HF Jobs
Run SmartPy/handwritten-text-recognition 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/SmartPy/handwritten-text-recognition. 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/SmartPy/handwritten-text-recognition 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/SmartPy/handwritten-text-recognition. 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/SmartPy/handwritten-text-recognition. 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 SmartPy/handwritten-text-recognition with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use SmartPy/handwritten-text-recognition with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="SmartPy/handwritten-text-recognition")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForMultimodalLM tokenizer = AutoTokenizer.from_pretrained("SmartPy/handwritten-text-recognition") model = AutoModelForMultimodalLM.from_pretrained("SmartPy/handwritten-text-recognition", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use SmartPy/handwritten-text-recognition with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "SmartPy/handwritten-text-recognition" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "SmartPy/handwritten-text-recognition", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/SmartPy/handwritten-text-recognition
- SGLang
How to use SmartPy/handwritten-text-recognition with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "SmartPy/handwritten-text-recognition" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "SmartPy/handwritten-text-recognition", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "SmartPy/handwritten-text-recognition" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "SmartPy/handwritten-text-recognition", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use SmartPy/handwritten-text-recognition with Docker Model Runner:
docker model run hf.co/SmartPy/handwritten-text-recognition
Training in progress, step 1000
Browse filesFiles changed (11)
- .gitignoreAdded+1
- config.json+1
- preprocessor_config.jsonAdded+17
- pytorch_model.bin+1-1
- runs/Oct30_03-40-30_2a250109a11f/1667101503.7434428/events.out.tfevents.1667101503.2a250109a11f.18.1Added+3
- runs/Oct30_03-40-30_2a250109a11f/events.out.tfevents.1667101503.2a250109a11f.18.0Added+3
- runs/Oct30_03-49-54_2a250109a11f/1667101799.4982827/events.out.tfevents.1667101799.2a250109a11f.18.3Added+3
- runs/Oct30_03-49-54_2a250109a11f/events.out.tfevents.1667101799.2a250109a11f.18.2Added+3
- runs/Oct30_03-52-17_2a250109a11f/1667101946.395966/events.out.tfevents.1667101946.2a250109a11f.18.5Added+3
- runs/Oct30_03-52-17_2a250109a11f/events.out.tfevents.1667101946.2a250109a11f.18.4Added+3
- training_args.binAdded+3
1checkpoint-*/1234{"architectures": ["VisionEncoderDecoderModel"],12345{"_name_or_path": "SmartPy/handwritten-text-recognition","architectures": ["VisionEncoderDecoderModel"],
1234567891011121314151617{ "do_normalize": true, "do_resize": true, "feature_extractor_type": "ViTFeatureExtractor", "image_mean": [ 0.5, 0.5, 0.5 ], "image_std": [ 0.5, 0.5, 0.5 ], "resample": 2, "size": 224}123version https://git-lfs.github.com/spec/v1oid sha256:b43e16923d13884d8236974426b716d72c0d64a4518718d2a4b181092c417554size 892571179123version https://git-lfs.github.com/spec/v1oid sha256:0d289ed8f2e5352d7bce73876cbac378eddc8dbd633b7a16b09b4aff36c1c747size 892571179
123version https://git-lfs.github.com/spec/v1oid sha256:a0f0b5fb1b89ade5b3fcb3df53e3095a1b7eac22c7b42975b218c3487e1f6241size 5601123version https://git-lfs.github.com/spec/v1oid sha256:d8455bf623f76ef9c57283bd10140a3c6222164092643055f0a4c3353397f306size 23398123version https://git-lfs.github.com/spec/v1oid sha256:488fd03c5dea6fc4a4c02c328119be375f69919d3fcbc62542abc49c00f9b097size 5601123version https://git-lfs.github.com/spec/v1oid sha256:fe6ca34c1442ceecb6515adfe0f195cb548a1800703fa2ee2087dd92c3059bc3size 9431123version https://git-lfs.github.com/spec/v1oid sha256:8a7e21c6c217e2ef5d49818ad25ed4b5a90917bde709a1a3ba8456fc2c01fa80size 5601123version https://git-lfs.github.com/spec/v1oid sha256:8574bcf1eef45ca068da2ecac65c706fc2aefc29b51b61ce2fa7b99b35888ec5size 87789123version https://git-lfs.github.com/spec/v1oid sha256:2cbb45873ad6c71be7fb87274733e5dc0a899fe0839ec19331e4555b198706f4size 3439.gitignoreAdded+1
config.json+1
preprocessor_config.jsonAdded+17
pytorch_model.bin+1-1
runs/Oct30_03-40-30_2a250109a11f/1667101503.7434428/events.out.tfevents.1667101503.2a250109a11f.18.1Added+3
runs/Oct30_03-40-30_2a250109a11f/events.out.tfevents.1667101503.2a250109a11f.18.0Added+3
runs/Oct30_03-49-54_2a250109a11f/1667101799.4982827/events.out.tfevents.1667101799.2a250109a11f.18.3Added+3
runs/Oct30_03-49-54_2a250109a11f/events.out.tfevents.1667101799.2a250109a11f.18.2Added+3
runs/Oct30_03-52-17_2a250109a11f/1667101946.395966/events.out.tfevents.1667101946.2a250109a11f.18.5Added+3
runs/Oct30_03-52-17_2a250109a11f/events.out.tfevents.1667101946.2a250109a11f.18.4Added+3
training_args.binAdded+3