An instruction fine-tuned Small Language Model (SLM) specialized in Machine Learning
domain expertise. Fine-tuned from unsloth/Llama-3.2-1B-bnb-4bit using LoRA adapters —
efficient enough to run on modest hardware while retaining strong ML-domain reasoning.
Part of the LLM-ArXiv-Domain-Expert
pipeline, which builds domain-expert LLMs from ArXiv papers end to end: paper parsing →
instruction/preference dataset generation → SFT → (optional) DPO.
10,000-sample subset of mlabonne/FineTome-Alpaca-100k — preserves general instruction-following alongside domain specialization
How to Use
fromunslothimportFastLanguageModelmodel,tokenizer=FastLanguageModel.from_pretrained(model_name="danivpv/Llama-ML-Expert-Instruct-1b",max_seq_length=2048,load_in_4bit=True,)FastLanguageModel.for_inference(model)prompt="""### Instruction:
{your ML question here}
### Response:
"""inputs=tokenizer(prompt,return_tensors="pt").to("cuda")outputs=model.generate(**inputs,max_new_tokens=256)print(tokenizer.decode(outputs[0],skip_special_tokens=True))
Limitations
1B-parameter base model: strong for domain-specialized short-form Q&A, not a
general-purpose reasoning or long-context model.
Trained on synthetically generated instruction data (see
ml-arxiv-instruct for
the generation pipeline) — inherits whatever biases or gaps exist in the source LLM
used to generate that data.