Downloads · 30 days
0
singtan/solvrays-gemma-2b-finetuned-pdf
solvrays-gemma-2b-finetuned-pdf is a text generation model from singtan. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as apache-2.0.
This model is a fine-tuned version of google/gemma-2b, specifically optimized for high-context understanding of technical documents processed via a Vision-Aided Document Engine. It leverages the same research and tech…
Downloads · 30 days
0
Access
Public
Updated Apr 30, 2026
Repo size
73.6 MB
Likes
0
Public
Click a slice to open those files.
.safetensors39.3 MB · 53%
From the Hugging Face model README
This model is a fine-tuned version of google/gemma-2b, specifically optimized for high-context understanding of technical documents processed via a Vision-Aided Document Engine. It leverages the same research and technology used in Google's Gemini models, condensed into a lightweight 2B parameter architecture suitable for edge deployment.
Gemma is a family of lightweight, state-of-the-art open models built by Google. This specific variant has been adapted using QLoRA (4-bit Quantization) to internalize specialized knowledge from a custom PDF corpus, preserving layout nuances through a hybrid Vision-OCR pipeline.
The model maintains its native training context length of 8,192 tokens, making it well-suited for long-form document summarization and complex reasoning tasks.
from transformers import AutoTokenizer, AutoModelForCausalLM, BitsAndBytesConfig
import torch
model_id = "singtan/solvrays-gemma-2b-finetuned-pdf"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
model_id,
device_map="auto",
quantization_config=BitsAndBytesConfig(load_in_4bit=True)
)
input_text = "Summarize the key findings of the provided documentation."
input_ids = tokenizer(input_text, return_tensors="pt").to("cuda")
outputs = model.generate(**input_ids, max_new_tokens=200)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
The model was fine-tuned on a diverse set of documents sourced from /content/. The data was processed using a Hybrid Vision-Aided Engine:
| Parameter | Value |
|---|---|
| Epochs | 3 |
| Batch Size | 1 |
| Learning Rate | 0.0001 |
| Optimizer | AdamW (8-bit) |
| Hardware | cuda |
| Quantization | 4-bit (bitsandbytes) |
This model inherits the safety principles of the Gemma family. Evaluations were conducted across categories including child safety, content safety, and representational harms. Users are encouraged to implement their own application-specific safety safeguards as outlined in the Responsible Generative AI Toolkit.
Fine-tuned by Bibek | Base model by Google.