Downloads · 30 days
5
9% of all-time downloads
suv11235/chandra-grpo-lora-10-ep-50-docs
chandra-grpo-lora-10-ep-50-docs is a machine learning model from suv11235. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for peft. The card lists the license as apache-2.0.
LoRA adapter for fine-tuned Chandra OCR model trained with GRPO (Group Relative Policy Optimization).
Downloads · 30 days
5
9% of all-time downloads
All-time downloads
58
Public
Repo size
11.4 MB
Likes
0
Public
Click a slice to open those files.
.json14.3 MB · 89%
From the Hugging Face model README
LoRA adapter for fine-tuned Chandra OCR model trained with GRPO (Group Relative Policy Optimization).
from peft import PeftModel, PeftConfig
from transformers import AutoModelForVision2Seq, AutoProcessor
# Load configuration
config = PeftConfig.from_pretrained("suv11235/chandra-grpo-lora-10-ep-50-docs")
# Load base model
base_model = AutoModelForVision2Seq.from_pretrained(
config.base_model_name_or_path,
torch_dtype="auto",
trust_remote_code=True,
)
# Load model with LoRA adapter
model = PeftModel.from_pretrained(base_model, "suv11235/chandra-grpo-lora-10-ep-50-docs")
# Load processor
processor = AutoProcessor.from_pretrained(
config.base_model_name_or_path,
trust_remote_code=True,
)
# Use for inference
# ... (process images and generate text)
If you need a standalone model (e.g., for vLLM):
from peft import PeftModel, PeftConfig
from transformers import AutoModelForVision2Seq
# Load with adapter
config = PeftConfig.from_pretrained("suv11235/chandra-grpo-lora-10-ep-50-docs")
base_model = AutoModelForVision2Seq.from_pretrained(
config.base_model_name_or_path,
torch_dtype="auto",
trust_remote_code=True,
)
model = PeftModel.from_pretrained(base_model, "suv11235/chandra-grpo-lora-10-ep-50-docs")
# Merge and save
merged_model = model.merge_and_unload()
merged_model.save_pretrained("./merged-model")
Trained to improve unit test pass rates on document OCR tasks.
If you use this model, please cite the base Chandra model and this fine-tuned version.