Run this model with HF Jobs

Run anakin87/LFM2-2.6B-ttt-sft on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.

Paste one of these prompts into your coding agent:

Fine-tune on my dataset

Use HF Jobs and TRL to fine-tune https://huggingface.co/anakin87/LFM2-2.6B-ttt-sft. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.

Run batch inference

Use HF Jobs to run batch inference with https://huggingface.co/anakin87/LFM2-2.6B-ttt-sft on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.

Evaluate on a benchmark

Use HF Jobs to evaluate https://huggingface.co/anakin87/LFM2-2.6B-ttt-sft. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.

Quantize for lower memory use

Use HF Jobs to create a 4-bit version of https://huggingface.co/anakin87/LFM2-2.6B-ttt-sft. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.
How to use from the
Use from the
Transformers library
# Use a pipeline as a high-level helper
from transformers import pipeline

pipe = pipeline("text-generation", model="anakin87/LFM2-2.6B-ttt-sft")
messages = [
    {"role": "user", "content": "Who are you?"},
]
pipe(messages)
# pip install -U transformers accelerate
# Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM

tokenizer = AutoTokenizer.from_pretrained("anakin87/LFM2-2.6B-ttt-sft")
model = AutoModelForCausalLM.from_pretrained("anakin87/LFM2-2.6B-ttt-sft", device_map="auto")
messages = [
    {"role": "user", "content": "Who are you?"},
]
inputs = tokenizer.apply_chat_template(
	messages,
	add_generation_prompt=True,
	tokenize=True,
	return_dict=True,
	return_tensors="pt",
).to(model.device)

outputs = model.generate(**inputs, max_new_tokens=256)
print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:]))
Quick Links

LFM2-2.6B-ttt-sft

Supervised Fine-Tuning checkpoint of LiquidAI/LFM2-2.6B for Tic Tac Toe.

The goal of this SFT warm-up was to teach the model the correct output format and valid move syntax, before applying Reinforcement Learning. The model is not a strong player at this stage.

This is an intermediate checkpoint from πŸŽ“ LLM RL Environments Lil Course, a hands-on course on building RL environments for Language Models, where models learn from rewards, not examples. It walks through the full process of turning a small open model into a specialist that outperforms a large proprietary one on a specific task (Tic Tac Toe). The final model is anakin87/LFM2-2.6B-mr-tictactoe.

πŸ€—πŸ•ΉοΈ Play against the final model

Training

  • Method: SFT with PRIME-RL
  • Dataset: anakin87/tictactoe-filtered (174 examples, ~5.5 epochs)
  • Steps: 30, batch size 32, lr 1e-5, seq_len 700
  • Hardware: NVIDIA RTX Pro 6000 96GB (~5 min)

Evaluation

100 games per setting.

Model vs random opponent % Wins % Draws % Losses % Follows format % Games w invalid moves
LiquidAI/LFM2-2.6B 40 11 49 27.8 40
anakin87/LFM2-2.6B-ttt-sft 74 13 13 99.8 11
Model vs optimal opponent % Wins % Draws % Losses % Follows format % Games w invalid moves
LiquidAI/LFM2-2.6B 0 11 89 24.7 43
anakin87/LFM2-2.6B-ttt-sft 0 52 48 99 14

Format following jumped from <30% to 99%. Gameplay strategy improved as a side effect.

Downloads last month
38
Safetensors
Model size
3B params
Tensor type
BF16
Β·
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Model tree for anakin87/LFM2-2.6B-ttt-sft

Finetuned
(49)
this model
Adapters
1 model
Finetunes
1 model
Quantizations
1 model

Dataset used to train anakin87/LFM2-2.6B-ttt-sft

Collection including anakin87/LFM2-2.6B-ttt-sft