CoolFace
Modelpublic

solvrays/solvrays-finetuned-pdf

sourceHugging Faceapache-2.0updated 5mo agoView on Hugging Face
0likes21downloads
Model Card

๐Ÿ“‚ Solvrays Finetuned Pdf - Document AI

๐ŸŒŸ Model Overview

This model is a high-precision fine-tuning of google/gemma-2b-it, specifically architected for Zero-Hallucination Technical Retrieval. It has been trained on a proprietary dataset of technical and architectural documentation to ensure deep contextual grounding.

๐Ÿš€ Key Capabilities

  • โ€”Technical Grounding: Prioritizes factual documentation over generative speculation.
  • โ€”Chunk-Aware Memory: Optimized for overlapping document segments (256-token window).
  • โ€”Deterministic Precision: Best used with do_sample=False for architectural accuracy.

๐Ÿ’ป Professional Implementation

The model requires specific prompt construction to trigger its 'Knowledge Retrieval' mode:

python
from transformers import AutoTokenizer, AutoModelForCausalLM
import torch

model_id = 'solvrays/solvrays-finetuned-pdf'
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
    model_id, 
    device_map='auto', 
    torch_dtype=torch.bfloat16, 
    quantization_config={'load_in_4bit': True}
)

def query_model(user_query):
    # High-Precision Retrieval Template
    prompt = f'### Knowledge Retrieval Content: {user_query}\n### Verified Response: '
    inputs = tokenizer(prompt, return_tensors='pt').to(model.device)
    outputs = model.generate(**inputs, max_new_tokens=512, do_sample=False)
    return tokenizer.decode(outputs[0], skip_special_tokens=True).split('### Verified Response:')[-1].strip()

๐Ÿ“Š Technical Specifications

FeatureConfiguration
Base Modelgoogle/gemma-2b-it
PrecisionBrainFloat16 (BF16)
Fine-tuningQLoRA (4-bit Normalized Float)
LoRA Rank (r)16
LoRA Alpha32
Target Modulesq, k, v, o, gate, up, down
Training Epochs25

๐Ÿ›  Training Environment

  • โ€”Hardware: NVIDIA L4 x 2 (Dual GPU Architecture)
  • โ€”Optimizer: Paged AdamW 8-bit
  • โ€”Context Length: 256 tokens per block

โš ๏ธ Constraints & Risk Mitigation

  • โ€”Out-of-Scope: This model is not intended for general conversation or creative writing. It is a specialized document analyst.
  • โ€”Hallucination Control: If information is not present in the internal weights, the model is trained to state 'Not Documented' or provide an empty response for verification.
  • โ€”Numerical Accuracy: Always cross-verify critical measurements with original PDF source material.

Senior AI Architect & Developer: Solvrays