Instructions to use NurErtug/pit-finance-grpo-merged with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use NurErtug/pit-finance-grpo-merged with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="NurErtug/pit-finance-grpo-merged", trust_remote_code=True)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("NurErtug/pit-finance-grpo-merged", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use NurErtug/pit-finance-grpo-merged with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "NurErtug/pit-finance-grpo-merged" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "NurErtug/pit-finance-grpo-merged", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/NurErtug/pit-finance-grpo-merged
- SGLang
How to use NurErtug/pit-finance-grpo-merged 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 "NurErtug/pit-finance-grpo-merged" \ --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": "NurErtug/pit-finance-grpo-merged", "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 "NurErtug/pit-finance-grpo-merged" \ --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": "NurErtug/pit-finance-grpo-merged", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use NurErtug/pit-finance-grpo-merged with Docker Model Runner:
docker model run hf.co/NurErtug/pit-finance-grpo-merged
# Load model directly
from transformers import AutoModelForCausalLM
model = AutoModelForCausalLM.from_pretrained("NurErtug/pit-finance-grpo-merged", trust_remote_code=True, device_map="auto")PIT Finance GRPO + Verifier System
This repository contains a verifier-guarded financial question answering system built on top of the PIT-4B point-in-time financial language model family.
The project combines:
- A merged GRPO-aligned PIT generator
- Numeric verification
- NLI-based semantic grounding verification
- Abstention behavior for unsupported answers
The objective is to improve reliability and reduce hallucinations in financial QA over earnings-call transcripts and financial documents.
Model Overview
Base Model
Diamegs/PIT-4B-FT-202212
Alignment
The model was aligned using:
- reasoning supervision
- GRPO-style preference optimization
- LoRA fine-tuning
- hallucination-aware financial QA data
The LoRA adapter was merged into the final model weights.
Final Merged Model
NurErtug/pit-finance-grpo-merged
Intended Use
The system is designed for:
- grounded financial QA
- earnings-call reasoning
- hallucination reduction
- numeric consistency
- abstention on unsupported questions
- verifier-guided inference
Verifier Architecture
The verifier is implemented as an inference-time guardrail wrapper.
The verifier is NOT merged into model weights.
The pipeline operates as follows:
User Question
โ
Merged PIT Generator
โ
Numeric Verifier
โ
NLI Verifier
โ
Abstention Policy
โ
Final Answer
Verification Components
1. Numeric Verifier
Checks whether numeric claims generated by the model are supported by the evidence/context.
Examples:
- unsupported dollar amounts
- hallucinated percentages
- fabricated growth figures
2. NLI Verifier
Uses:
MoritzLaurer/DeBERTa-v3-base-mnli-fever-anli
to verify semantic support between:
- evidence/context
- generated answer
Possible outcomes:
- entailment
- neutral
- contradiction
3. Abstention Policy
If the verifier determines:
- insufficient evidence
- unsupported claims
- semantic contradiction
the system returns:
NOT ENOUGH INFORMATION.
instead of hallucinating an answer.
Installation
Clone the repository:
git clone https://huggingface.co/NurErtug/pit-finance-grpo-merged
cd pit-finance-grpo-merged
Install dependencies:
pip install -r requirements.txt
Loading the Model
from transformers import AutoTokenizer, AutoModelForCausalLM
import torch
model_name = "NurErtug/pit-finance-grpo-merged"
tokenizer = AutoTokenizer.from_pretrained(
model_name,
trust_remote_code=True,
use_fast=False,
)
model = AutoModelForCausalLM.from_pretrained(
model_name,
trust_remote_code=True,
torch_dtype=torch.float16,
device_map="auto",
)
model.eval()
Using the Verifier Wrapper
from verifier_wrapper import VerifierWrapper
wrapper = VerifierWrapper()
context = """
Revenue increased 18% year-over-year.
Alternative minimum tax credits totaled $125 million.
"""
question = "What was the revenue growth?"
result = wrapper.answer(
context=context,
question=question,
)
print(result)
Example Output
{
"initial_answer": "Revenue increased 18% year-over-year.",
"final_answer": "Revenue increased 18% year-over-year.",
"rejected": False,
"reward": 1.8
}
Example rejected output:
{
"initial_answer": "$250 million",
"final_answer": "NOT ENOUGH INFORMATION.",
"rejected": True,
"reject_reason": "verifier_failed"
}
Repository Contents
README.md
verifier_wrapper.py
requirements.txt
config.json
generation_config.json
model.safetensors
tokenizer files
Research Motivation
Financial QA systems are especially vulnerable to:
- hallucinated financial figures
- unsupported claims
- temporal leakage
- fabricated reasoning
This project explores verifier-guided inference as a lightweight alternative to:
- expensive RLHF pipelines
- larger judge-model architectures
- fully integrated verifier training
The verifier wrapper provides an interpretable post-generation filtering mechanism for improving reliability in financial language models.
Limitations
The system may still:
- over-abstain
- reject partially correct answers
- fail under highly ambiguous contexts
- struggle with extremely long contexts
The verifier improves robustness but does not guarantee factual correctness.
Citation
@misc{pit_finance_verifier_2026,
title={PIT Finance GRPO + Verifier System},
author={Nur Ertug},
year={2026},
publisher={Hugging Face}
}
License
Apache-2.0
- Downloads last month
- 14
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="NurErtug/pit-finance-grpo-merged", trust_remote_code=True)