Downloads · 30 days
0
koushikkanch/large-model
large-model is a machine learning model from koushikkanch. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
A question answering model fine-tuned on Czech language data using mBART-large. The model takes questions in Czech and generates responses in Czech.
Downloads · 30 days
0
Access
Public
Updated Dec 10, 2024
Repo size
65.5 MB
Likes
0
Public
Click a slice to open those files.
.json32.3 MB · 49%
From the Hugging Face model README
A question answering model fine-tuned on Czech language data using mBART-large. The model takes questions in Czech and generates responses in Czech.
LoRA Config:
- r=16
- lora_alpha=32
- target_modules=["q_proj", "k_proj", "v_proj", "o_proj"]
- lora_dropout=0.1
Training Args:
- learning_rate=2e-4
- per_device_train_batch_size=8
- gradient_accumulation_steps=2
- num_train_epochs=3
- weight_decay=0.01
- warmup_steps=100
from transformers import M2M100ForConditionalGeneration, AutoTokenizer
# Load model and tokenizer
model_name = "koushikkanch/large-model"
model = M2M100ForConditionalGeneration.from_pretrained(model_name)
tokenizer = AutoTokenizer.from_pretrained(model_name)
# Example usage
question = "Je tu obsazeno?"
inputs = tokenizer(question, return_tensors="pt")
outputs = model.generate(**inputs)
answer = tokenizer.decode(outputs[0], skip_special_tokens=True)