Downloads · 30 days
6
11% of all-time downloads
shehrozrafaqat/football-llama31-8b-qlora
football-llama31-8b-qlora is a text generation model from shehrozrafaqat. Use it when you need the model to write or continue text. It is set up for peft. The card lists the license as llama3.1.
This repository contains a PEFT LoRA adapter fine-tuned for a global football knowledge assistant assignment.
Downloads · 30 days
6
11% of all-time downloads
All-time downloads
56
Public
Repo size
185 MB
Likes
0
Public
Click a slice to open those files.
.safetensors168 MB · 91%
From the Hugging Face model README
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.
unsloth/Meta-Llama-3.1-8B-Instruct-bnb-4bitshehrozrafaqat/football-llama31-8b-qlorashehrozrafaqat/global-football-assistant-datasetSFTTrainer + QLoRAThe synthetic ChatML dataset contains 9,600 examples:
The dataset covers FIFA/global football, continental competitions, domestic leagues, clubs, rules, tactics, positions, analytics, history, and date-aware safety behavior.
This repo includes two 20-prompt held-out comparison files:
base_model_eval.jsonlfinetuned_model_eval.jsonlEach row includes:
promptexpected_answermodel_answersubjectcategoryThese files are useful for assignment evidence because the 8B model is too large to load comfortably on a normal laptop CPU.
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())
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.