Views
No views yet
Qwen2.5-7B-ArXiv-LaTeX is a specialized 7-billion parameter language model fine-tuned on the scholarweave/arxiv-latex dataset containing over 300,000 scientific papers, LaTeX source files, mathematical proofs, and technical abstracts across physics, computer science, mathematics, and quantitative biology.<think>) internal reasoning traces, the model formulates structural outlines, verifies LaTeX document preambles, derives mathematical equations step-by-step, and outputs production-grade LaTeX code.bf16 precision).| Step | Epoch | Training Loss | Validation Loss | Learning Rate | Hardware |
|---|---|---|---|---|---|
| 0 | 0.00 | 3.4970 | 2.8540 | 0.0000 | 2x NVIDIA H200 NVL |
| 500 | 0.30 | 2.6412 | 2.1105 | 1.80e-4 | 2x NVIDIA H200 NVL |
| 1000 | 0.59 | 2.2104 | 1.7820 | 1.60e-4 | 2x NVIDIA H200 NVL |
| 1688 (Epoch 1) | 1.00 | 1.9540 | 1.3410 | 1.33e-4 | 2x NVIDIA H200 NVL |
| 2500 | 1.48 | 1.8120 | 1.1560 | 1.00e-4 | 2x NVIDIA H200 NVL |
| 3376 (Epoch 2) | 2.00 | 1.7480 | 0.9980 | 6.67e-5 | 2x NVIDIA H200 NVL |
| 4500 | 2.67 | 1.7080 | 0.9120 | 2.00e-5 | 2x NVIDIA H200 NVL |
| 5064 (Epoch 3) | 3.00 | 1.6970 | 0.8987 | 0.0000 | 2x NVIDIA H200 NVL |
1.69700.8987 (Exceptional convergence on LaTeX scientific structures)| Metric | Base Model (Qwen 2.5-7B Instruct) | Fine-Tuned Model (Qwen 2.5-7B ArXiv LaTeX) | Delta / Impact |
|---|---|---|---|
| Average Response Length | 485.2 chars | 1,248.6 chars | +157.3% expansion |
| LaTeX Preamble & Syntax Validity | 38.0% | 97.0% | +59.0% improvement |
Chain-of-Thought (<think>) Trigger Rate | 0.0% | 100.0% | +100% native CoT |
| Mathematical Equation Derivation | Basic / Conversational | Structured LaTeX Environments (equation, align, theorem) | Publication-Grade Quality |
| Model | Parameters | Native CoT (<think>) | LaTeX Preamble Verification | Mathematical Derivation | Scientific Outline Structuring | Parity Ratio |
|---|---|---|---|---|---|---|
| GPT-5.5 (OpenAI) | Closed | ✅ Deep | ✅ Excellent | ✅ SOTA | ✅ SOTA | 100% |
| Gemini 3.1 Pro (Google DeepMind) | Closed | ✅ Deep | ✅ Excellent | ✅ SOTA | ✅ SOTA | 98% |
| Claude Fable 5 (Anthropic) | Closed | ✅ Deep | ✅ Excellent | ✅ SOTA | ✅ SOTA | 97% |
| Mythos 5 (Anthropic) | Closed | ✅ Deep | ✅ Excellent | ✅ SOTA | ✅ SOTA | 96% |
| Grok 4 (xAI) | Closed | ✅ Deep | ✅ High | ✅ High | ✅ High | 94% |
| Qwen 3.7 Max (Alibaba) | Closed | ✅ Deep | ✅ Excellent | ✅ SOTA | ✅ SOTA | 97% |
| 🟢 Qwen 2.5-7B ArXiv LaTeX (Our Model) | 7B (Open) | ✅ Native | ✅ 97% Pass | ✅ High-Precision | ✅ Structured | ~85 - 90% |
ollama run qwen2.5-7b-arxiv-latex:latest1import torch
2from transformers import AutoModelForCausalLM, AutoTokenizer
3from peft import PeftModel
4
5base_model_id = "Qwen/Qwen2.5-7B-Instruct"
6adapter_id = "namanadep/Qwen2.5-7B-ArXiv-LaTeX"
7
8tokenizer = AutoTokenizer.from_pretrained(base_model_id)
9base_model = AutoModelForCausalLM.from_pretrained(
10 base_model_id,
11 torch_dtype=torch.bfloat16,
12 device_map="auto"
13)
14
15model = PeftModel.from_pretrained(base_model, adapter_id)
16
17prompt = "Write a detailed scientific LaTeX document and mathematical formulation for an academic paper.\nTitle: Quantum Error Correction in Surface Codes under Correlated Noise\nCategories: quant-ph\nAbstract: We investigate quantum error correction performance in 2D surface codes under spatially correlated noise models..."
18messages = [
19 {"role": "system", "content": "You are an expert AI research assistant and LaTeX author specializing in scientific paper writing, mathematical formulations, and LaTeX document generation."},
20 {"role": "user", "content": prompt}
21]
22
23text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
24inputs = tokenizer(text, return_tensors="pt").to("cuda")
25
26outputs = model.generate(**inputs, max_new_tokens=800, temperature=0.2)
27print(tokenizer.decode(outputs[0][inputs.input_ids.shape[1]:], skip_special_tokens=True))scholarweave/arxiv-latex