Downloads · 30 days
0
RMunshi/librarian-qwen-extractor
librarian-qwen-extractor is a text generation model from RMunshi. Use it when you need the model to write or continue text. It is set up for peft. The card lists the license as apache-2.0.
This is the designated "Extraction Specialist" for the Dual-Student Paradigm in our Master's Thesis on PDF Distillation and Document Intelligence. It acts as the secondary routing engine, transforming raw markdown tex…
Downloads · 30 days
0
Access
Public
Updated Apr 7, 2026
Parameters
7.6B
15.2 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors15.2 GB · 100%
From the Hugging Face model README
This is the designated "Extraction Specialist" for the Dual-Student Paradigm in our Master's Thesis on PDF Distillation and Document Intelligence. It acts as the secondary routing engine, transforming raw markdown text grids into strict Pydantic JSON schemas.
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "RMunshi/librarian-qwen-extractor"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id, device_map="auto")
prompt = "Extract the entities from this text into JSON:\nThe ACME 5000 is an industrial router running firmware 2.1."
messages = [
{"role": "user", "content": prompt}
]
text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = tokenizer([text], return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_new_tokens=512)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
This model is fine-tuned explicitly to generate Chain-of-Thought (CoT) reasoning logs (<thought>) followed by structured JSON (json) extraction graphs.
In our intelligent routing architecture:
Trained on 870 pristine synthetically generated industrial PDF layouts distilled directly using GPT-4o and verified via OpenCV masking.