Model Overview:

This model is a fine-tuned version of the "ytu-ce-cosmos/turkish-gpt2-medium-350m-instruct-v0.1", designed specifically for Turkish Question-Answering (Q&A). The fine-tuning process utilized a custom dataset generated from Turkish Wikipedia articles, focusing on factual knowledge.

Base Model: ytu-ce-cosmos/turkish-gpt2-medium-350m-instruct-v0.1 Fine-Tuned Dataset: Custom Turkish Q&A dataset Evaluation Loss: 2.1461 (on the validation dataset)

Quick Start

from transformers import AutoTokenizer, AutoModelForCausalLM


model_name = "./fine_tuned_model"  # Replace with your Hugging Face model path if uploaded
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(model_name)


question = "Kamu sosyolojisi nedir?"


input_ids = tokenizer(question, return_tensors="pt").input_ids


output = model.generate(
    input_ids=input_ids,
    max_length=50,
    num_return_sequences=1,
    temperature=0.7
)

response = tokenizer.decode(output[0], skip_special_tokens=True)
print(f"Question: {question}")
print(f"Answer: {response}")

Training Details:

Dataset Source: Custom dataset generated from Turkish Wikipedia Number of Training Examples: 2,606 Training Dataset Size: 2,084 (80%) Validation Dataset Size: 522 (20%) Number of Epochs: 3 Batch Size: 8 Learning Rate: 5e-5 Evaluation Loss: 2.1461

Downloads last month
9
Safetensors
Model size
355M params
Tensor type
F32
·
Inference Providers NEW
This model is not currently available via any of the supported Inference Providers.

Model tree for ZeynepAltundal/Wikipedia

Dataset used to train ZeynepAltundal/Wikipedia