Sovereign Domain SLMs
Collection
Domain-adapted Small Language Models fine-tuned for statutory law, silicon hardware design, chemistry, and formal mathematics. β’ 6 items β’ Updated
How to use shreyansh12183/olmo2-7b-phd-pure-math with PEFT:
from peft import PeftModel
from transformers import AutoModelForCausalLM
base_model = AutoModelForCausalLM.from_pretrained("allenai/OLMo-2-1124-7B-Instruct")
model = PeftModel.from_pretrained(base_model, "shreyansh12183/olmo2-7b-phd-pure-math")A mathematical reasoning adapter fine-tuned on advanced proofs in Algebraic Topology, Differential Geometry, Abstract Algebra, and Real Analysis.
Developed by Shreyansh Singh to investigate rigorous symbolic reasoning in open-weight language models.
This model is uploaded as a PEFT LoRA Adapter. To load and run inference in Python using transformers & peft:
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
base_model_id = "allenai/OLMo-2-1124-7B-Instruct"
adapter_id = "shreyansh12183/olmo2-7b-phd-pure-math"
# 1. Load Base Model & Tokenizer
tokenizer = AutoTokenizer.from_pretrained(base_model_id)
base_model = AutoModelForCausalLM.from_pretrained(
base_model_id,
torch_dtype=torch.float16,
device_map="auto"
)
# 2. Attach LoRA Adapter
model = PeftModel.from_pretrained(base_model, adapter_id)
# 3. Generate Response
prompt = "Your prompt here..."
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_new_tokens=512)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
To run this model on laptops/macbooks using LM Studio, Ollama, or Jan.ai:
shreyansh12183/ GGUF repos).ollama run hf.co/shreyansh12183/olmo2-7b-phd-pure-math-GGUF:Q4_K_M
Developed by ExperimentLab AI | Official Website: https://experimentlab.in | Contact: shreyansh@experimentlab.in
Base model
allenai/OLMo-2-1124-7B