Downloads · 30 days
16
22% of all-time downloads
MLBenyamin/gpt2-gaia-lora-adapter
gpt2-gaia-lora-adapter is a text generation model from MLBenyamin. Use it when you need the model to write or continue text. It is set up for peft.
This model is a LoRA (Low-Rank Adaptation) fine-tuned version of the openai-community/gpt2 base model. It has been adapted using the GAIA benchmark dataset to perform question-answering tasks.
Downloads · 30 days
16
22% of all-time downloads
All-time downloads
73
Public
Repo size
3.3 MB
Likes
2
Public
Click a slice to open those files.
.json3.6 MB · 52%
From the Hugging Face model README
This model is a LoRA (Low-Rank Adaptation) fine-tuned version of the openai-community/gpt2 base model. It has been adapted using the GAIA benchmark dataset to perform question-answering tasks.
This model utilizes 4-bit NF4 quantization to efficiently fine-tune the GPT-2 architecture. It was trained for 50 steps on a specialized instruction-following template constructed from the GAIA dataset. This model card has been automatically generated.
openai-community/gpt2This model is intended to be used as a causal language model adapted specifically for answering questions in the format of the GAIA benchmark.
Due to the highly constrained training pipeline (115 training examples, 50 maximum steps), this model is not suitable for generalized zero-shot chatting, open-ended conversational tasks, or production-grade question answering.
The model inherits the biases and limitations of the base openai-community/gpt2 model. Additionally, it was trained on a severely restricted subset of data (115 samples), meaning its generative capabilities are highly narrowed and prone to hallucination if queried outside the specific prompt structure it was trained on.
Users should be aware that this is a lightweight adapter intended for research or demonstration purposes rather than robust, accurate data retrieval.
Use the code below to get started with the model.
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
base_model_id = "openai-community/gpt2"
adapter_id = "MLBenyamin/gpt2-gaia-lora-adapter"
tokenizer = AutoTokenizer.from_pretrained(adapter_id)
base_model = AutoModelForCausalLM.from_pretrained(base_model_id)
model = PeftModel.from_pretrained(base_model, adapter_id)
prompt = "Question: {your_question}\nAnswer: "
inputs = tokenizer(prompt, return_tensors="pt")
outputs = model.generate(**inputs, max_new_tokens=50)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))