alakxender/dv-articles-sm-gpt2

🤗 Hugging Face sourcetext-generationmit13M params26 MBsafetensors✓ 11 checksumsupdated today
Submit in one command

Run it next to your model folder. It makes the torrent, checks your files against Hugging Face, and submits it. You just start seeding and paste your key from your account. It only reads your files and never changes them. Read the script first if you like.

curl -fsSL https://pirateface.co/package.sh | bash -s -- --repo alakxender/dv-articles-sm-gpt2 ./model-folder
Needs a seeder →

Dhivehi GPT-2

A GPT-2 language model trained on Dhivehi text data for text generation.

Model Details

  • Architecture: GPT-2
  • Vocab Size: 32,000 tokens
  • Context Length: 1024 tokens
  • Embedding Size: 768
  • Layers: 12
  • Attention Heads: 12
  • Total Parameters: ~124M

Training

The model is trained on Dhivehi text data with the following configuration:

  • Training Epochs: 3
  • Batch Size: 16 (4 per device with gradient accumulation of 4)
  • Learning Rate: 5e-4 with cosine decay
  • Weight Decay: 0.01
  • Warmup: 10% of training steps
  • Mixed Precision Training (FP16)
  • Early Stopping with patience of 3

Usage

def simple_generate(prompt, model_path):
    from grapp import DhivehiGPT2Generator
    generator = DhivehiGPT2Generator(model_path)
    return generator.generate_text(prompt, max_length=200)[0]

# Example usage:
result = simple_generate("ސުރުޚީ: ރާއްޖޭގެ", "alakxender/dv-articles-sm-gpt2")
print(result)