Downloads · 30 days
31
23% of all-time downloads
mohdusman001/schema-gen-llama3-8b-stage1-merged
schema-gen-llama3-8b-stage1-merged is a text generation model from mohdusman001. Use it when you need the model to write or continue text. It is set up for transformers.
This is the merged schema-generation checkpoint for the TabRL team project. It takes source text and generates a JSON schema for the first step of a two-stage text-to-table system. The second step uses the source text…
Downloads · 30 days
31
23% of all-time downloads
All-time downloads
137
Public
Parameters
8B
16.7 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors16.7 GB · 100%
From the Hugging Face model README
This is the merged schema-generation checkpoint for the TabRL team project. It takes source text and generates a JSON schema for the first step of a two-stage text-to-table system. The second step uses the source text and schema to generate table rows.
The project uses Llama 3.1 8B with LoRA supervised fine-tuning. This repository contains merged model weights, tokenizer files and a separate saved LoRA adapter. It is the schema policy; the three context-length stages inside its trainer are separate from the two schema/table policies.
The report credits Usman Mehboob Mohammed with system design, both SFT pipelines, data preparation, training runs and integration. This is team work; the report records the full contribution split.
The public trainer uses VERL/FSDP and FlashAttention-2, supports LoRA, and exposes a staged 2K/4K/8K context schedule. Its input builder creates instruction messages from source text and gold schemas. The script defaults are not a complete record of this checkpoint's final run configuration, data counts or compute cost.
The MONA-style reinforcement-learning extension in the project report is a design. This checkpoint is not evidence of a completed RL experiment or an RL improvement.
Interpret the evaluation file with its protocol and the project report. The presence of a checkpoint or generated samples does not establish production quality or state-of-the-art performance.
This example loads the merged checkpoint directly, without a PEFT adapter. It requires an environment with compatible PyTorch, Transformers and Accelerate and enough memory for the model. Running it downloads model files; the documentation repair did not rerun inference. For prompts aligned with the full training policy, inspect the linked instruction builder.
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "mohdusman001/schema-gen-llama3-8b-stage1-merged"
tokenizer = AutoTokenizer.from_pretrained(model_id)
if tokenizer.pad_token_id is None:
tokenizer.pad_token = tokenizer.eos_token
model = AutoModelForCausalLM.from_pretrained(
model_id, torch_dtype=torch.bfloat16, device_map="auto"
)
model.eval()
messages = [
{
"role": "system",
"content": "You induce minimal JSON schemas from documents. "
"Output strictly valid JSON with no commentary.",
},
{"role": "user", "content": "Product: Desk lamp. Price: 25 USD."},
]
prompt = tokenizer.apply_chat_template(
messages, tokenize=False, add_generation_prompt=True
)
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
with torch.inference_mode():
output = model.generate(
**inputs, max_new_tokens=320, do_sample=False,
pad_token_id=tokenizer.pad_token_id,
eos_token_id=tokenizer.eos_token_id,
)
new_tokens = output[0, inputs["input_ids"].shape[1]:]
print(tokenizer.decode(new_tokens, skip_special_tokens=True))
Generated schema text must be parsed and validated before use. Inspect malformed outputs and missing or unsupported fields rather than treating valid JSON as factual correctness.
Use this checkpoint to study schema induction, inspect intermediate outputs and reproduce the team's text-to-table methods. Structured outputs can be malformed, omit facts or invent structure. The published examples are research artifacts, not a deployed decision system. No new quality result is claimed by this documentation update.
Contact: [email protected].