How to use from
Unsloth Studio
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh
# Run unsloth studio
unsloth studio -H 0.0.0.0 -p 8888
# Then open http://localhost:8888 in your browser
# Search for shehrozrafaqat/football-llama31-8b-qlora to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex
# Run unsloth studio
unsloth studio -H 0.0.0.0 -p 8888
# Then open http://localhost:8888 in your browser
# Search for shehrozrafaqat/football-llama31-8b-qlora to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required
# Open https://huggingface.co/spaces/unsloth/studio in your browser
# Search for shehrozrafaqat/football-llama31-8b-qlora to start chatting
Load model with FastModel
pip install unsloth
from unsloth import FastModel
model, tokenizer = FastModel.from_pretrained(
    model_name="shehrozrafaqat/football-llama31-8b-qlora",
    max_seq_length=2048,
)
Quick Links

Football Llama 3.1 8B QLoRA Adapter

This repository contains a PEFT LoRA adapter fine-tuned for a global football knowledge assistant assignment.

It is not a full copied model. Load the base model first, then attach this adapter.

  • Base model: unsloth/Meta-Llama-3.1-8B-Instruct-bnb-4bit
  • Adapter repo: shehrozrafaqat/football-llama31-8b-qlora
  • Dataset: shehrozrafaqat/global-football-assistant-dataset
  • Training route: Unsloth + TRL SFTTrainer + QLoRA
  • Training hardware: Google Colab Tesla T4
  • Training run: 1 epoch, 3,840 steps
  • Final Colab training loss: 2.3110
  • Dataset verified date: 2026-04-23

Dataset

The synthetic ChatML dataset contains 9,600 examples:

  • Train: 7,680
  • Validation: 960
  • Test: 960
  • Held-out bonus evaluation prompts: 240
  • Duplicate user prompts: 0
  • Training/evaluation prompt overlap: 0

The dataset covers FIFA/global football, continental competitions, domestic leagues, clubs, rules, tactics, positions, analytics, history, and date-aware safety behavior.

Included Evaluation Files

This repo includes two 20-prompt held-out comparison files:

  • base_model_eval.jsonl
  • finetuned_model_eval.jsonl

Each row includes:

  • prompt
  • expected_answer
  • model_answer
  • subject
  • category

These files are useful for assignment evidence because the 8B model is too large to load comfortably on a normal laptop CPU.

Inference Example

Use a GPU runtime for live inference.

import torch
from peft import PeftModel
from transformers import AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig

base_model_id = "unsloth/Meta-Llama-3.1-8B-Instruct-bnb-4bit"
adapter_id = "shehrozrafaqat/football-llama31-8b-qlora"

bnb_config = BitsAndBytesConfig(load_in_4bit=True)

tokenizer = AutoTokenizer.from_pretrained(adapter_id)
base_model = AutoModelForCausalLM.from_pretrained(
    base_model_id,
    quantization_config=bnb_config,
    device_map="auto",
    torch_dtype=torch.float16,
)
model = PeftModel.from_pretrained(base_model, adapter_id)
model.eval()

messages = [
    {"role": "system", "content": "You are a careful football knowledge assistant."},
    {"role": "user", "content": "Explain goal difference in football."},
]

prompt = tokenizer.apply_chat_template(
    messages,
    tokenize=False,
    add_generation_prompt=True,
)
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)

with torch.no_grad():
    output_ids = model.generate(
        **inputs,
        max_new_tokens=120,
        do_sample=False,
        pad_token_id=tokenizer.eos_token_id,
    )

answer_ids = output_ids[0][inputs["input_ids"].shape[-1]:]
print(tokenizer.decode(answer_ids, skip_special_tokens=True).strip())

Notes

The model is intended for assignment demonstration and controlled evaluation, not for live football news. Current fixtures, scores, standings, transfers, injuries, and manager status should be verified from official or trusted current sources.

Downloads last month
4
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for shehrozrafaqat/football-llama31-8b-qlora

Dataset used to train shehrozrafaqat/football-llama31-8b-qlora

Space using shehrozrafaqat/football-llama31-8b-qlora 1