gemma-2-2b-slm-finetuned

QLoRA (rank 16) fine-tune of google/gemma-2-2b on the same synthetic legal/financial instruction dataset used for Probabilistr/slm-125m-finetuned (grounded QA/RAFT, summarization, extraction-to-JSON, and plain-English rewrite tasks generated with gpt-4o-mini from case-law and SEC-filing passages). See the slm-125m project's Instructions_for_finetuning.txt for the full data pipeline.

Fine-tuning

  • 1x A100-40GB, QLoRA rank 16 (alpha 32), 3 epochs, 1671 steps
  • Loss masked to only the model-response tokens
  • This repo contains a LoRA adapter only -- load with peft.PeftModel.from_pretrained on top of the base model, or merge with merge_and_unload().

Prompt format

Gemma's native turn format, with the system prompt folded into the user turn (Gemma has no separate system role):

<bos><start_of_turn>user
You are a legal/financial assistant. Answer strictly using the information in the provided context. If the answer is not stated in the context, say "Not stated in the context."

Context:
{context}

Instruction: {instruction}<end_of_turn>
<start_of_turn>model

Generation should stop on <end_of_turn>, not just <eos>.

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for Probabilistr/gemma-2-2b-slm-finetuned

Adapter
(220)
this model