main
base_model, library_name, tags, licence
| base_model | library_name | tags | licence | ||||
|---|---|---|---|---|---|---|---|
| Qwen/Qwen2.5-3B-Instruct | transformers |
|
license |
Model Card for LUNAR
This model is a fine-tuned version of Qwen/Qwen2.5-3B-Instruct on the NACC dataset. It has been trained using TRL.
Quick start
system_prompt = "Please reason step by step, and put your final answer within \\boxed{}."
question = """Question: The patient is a 70 year old ...
Using the information provided, determine the patient’s cognitive status.
Answer Choices:
A. Normal Cognition
B. Mild Cognitive Impairment
C. Dementia
"""
Option 1: Hugging Face Transformers
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "vkola-lab/LUNAR"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
model_id,
torch_dtype="auto",
device_map="auto",
)
messages = [
{"role": "system", "content": system_prompt},
{"role": "user", "content": question}
]
inputs = tokenizer.apply_chat_template(
messages,
add_generation_prompt=True,
return_tensors="pt",
return_dict=True,
).to(model.device)
outputs = model.generate(
**inputs,
max_new_tokens=10000,
do_sample=True,
temperature=1,
top_p=1.0,
)
response = tokenizer.decode(
outputs[0][inputs["input_ids"].shape[-1]:],
skip_special_tokens=True,
)
print(response)
Option 2: vLLM
from vllm import LLM, SamplingParams
llm = LLM(model="vkola-lab/LUNAR")
sampling_params = SamplingParams(temperature=1, top_p=1.0, max_tokens=10000)
messages = [
{"role": "system", "content": system_prompt},
{"role": "user", "content": question}
]
outputs = llm.chat(messages, sampling_params)
print(outputs[0].outputs[0].text)
Alternatively, serve the model with an OpenAI-compatible API:
vllm serve vkola-lab/LUNAR
Training procedure
This model was trained with GRPO, a method introduced in DeepSeekMath: Pushing the Limits of Mathematical Reasoning in Open Language Models.
Framework versions
Training
- Python: 3.11.13
- CUDA: 12.4
- PyTorch: 2.6.0
- Triton: 3.2.0
- Transformers: 4.52.4
- TRL: 0.19.0
- vLLM: 0.8.5.post1
- DeepSpeed: 0.16.8
- Datasets: 4.0.0
- Tokenizers: 0.21.4
Inference / Evaluation
- Python: 3.12.11
- PyTorch: 2.9.0+cu128
- Transformers: 4.57.6
- vLLM: 0.11.2
Citations
Cite LUNAR as:
Languages
Jinja
100%