/ Модель

Характеристики

Контекст
1 024 токена
Параметры
57,2 млн
Лицензия
MIT
Архитектура
llama · dense
Библиотека
transformers
Опубликована
26 сен 2025

MyAwesome-299M-Model

Генерация текстаТекст → текст3 профессии

Компактная модель Llama с 57,2 млн параметров служит основой для генерации текста и адаптерного дообучения под специализированные задачи.

112скачиваний за 30 дней2лайкавеса обновлены27 сен 2025

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Тесты пользователейпока нет

Никто ещё не опубликовал тест этой модели. Соберите бенчмарк из своих задач — результат появится здесь.

  1. Добавьте модель в бенчмарк

    Вместе с другими моделями категории «Текст» — сравнение идёт внутри одной категории.

  2. Опишите свои задачи

    Напишите запросы, при необходимости приложите файлы и эталонные ответы.

  3. Запустите и опубликуйте

    Модели ответят на каждую задачу, судья оценит ответы. Опубликованный результат появится на этой странице.

Публичные оценки

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

В подключённых источниках результатов для этой модели пока нет.

Что умеет модель

Описание составлено по карточке модели и метаданным Hugging Face

MyAwesome-299M-Model — компактная языковая модель на архитектуре Llama, разработанная автором репозитория с нуля и предназначенная прежде всего для экспериментов с адаптерами и быстрой специализации под отдельные задачи. Несмотря на название, в модели 57,2 млн параметров. Это декодерный трансформер с 8 слоями, размерностью 512 и Grouped-Query Attention; используются токенизатор, совместимый с GPT-2, и контекст длиной 1 024 токена.

Модель подходит как основа для генерации текста и дообучения с LoRA или другими параметрически эффективными адаптерами. В README приведены сценарии адаптации для математики, программирования и творческого письма, а также описаны инструменты для расширения словаря и дистилляции знаний от более крупных моделей. Карточка заявляет низкие требования к памяти и быстрый инференс, но конкретные результаты зависят от оборудования и дообучения.

Базовые веса случайно инициализированы, поэтому качество модели без обучения не следует считать готовым к практическим задачам. Она преимущественно рассчитана на английский язык, а короткий контекст ограничивает работу с длинными документами. Лицензия — MIT.

Сценарии применения

  • эксперименты с генерацией текста на компактной модели
  • создание адаптера для математических объяснений
  • адаптация модели для генерации и отладки кода
  • дообучение модели для творческого письма
  • прототипирование приложений с параметрически эффективным дообучением
  • дистилляция знаний от более крупной модели после подготовки

Ограничения

Веса случайно инициализированы, поэтому для полезных ответов модель требует обучения или дообучения. Контекст ограничен 1 024 токенами, а основная языковая ориентация — английская.

Для каких профессий подходит3

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

MyAwesome-299M-Model

A compact, efficient language model built from scratch demonstrating the Transfer-First paradigm - optimized for adapter-based fine-tuning and rapid task specialization.

🚀 Model Overview

  • Model Type: Decoder-only transformer (Llama architecture)
  • Built From Scratch: Custom implementation with randomly initialized weights
  • Parameters: 57.2M (demonstration size)
  • Architecture: 512d × 8 layers with Grouped-Query Attention
  • Vocabulary: 50,257 tokens (GPT-2 compatible tokenizer for convenience)
  • Context Length: 1,024 tokens
  • Memory Usage: ~115MB (bfloat16)

⚡ Key Features

  • Adapter-Ready: Optimized for LoRA and other parameter-efficient fine-tuning
  • Fast Inference: 50+ tokens/second on modern hardware
  • Memory Efficient: Sub-200MB deployment footprint
  • Task Switching: Load different 8MB adapters for instant specialization
  • Vocabulary Expansion: Surgically expand vocabulary for distillation from any teacher model

🎯 Quick Start

Basic Text Generation

from transformers import AutoModelForCausalLM, AutoTokenizer
import torch

# Load model and tokenizer
model = AutoModelForCausalLM.from_pretrained("shivash/MyAwesome-299M-Model")
tokenizer = AutoTokenizer.from_pretrained("shivash/MyAwesome-299M-Model")

# Generate text
prompt = "The future of AI is"
inputs = tokenizer(prompt, return_tensors="pt")

with torch.no_grad():
    outputs = model.generate(
        **inputs,
        max_new_tokens=50,
        temperature=0.7,
        do_sample=True,
        pad_token_id=tokenizer.eos_token_id
    )

response = tokenizer.decode(outputs[0], skip_special_tokens=True)
print(response)

Adapter Fine-tuning (Recommended)

from peft import LoraConfig, get_peft_model, TaskType

# Configure LoRA adapter
lora_config = LoraConfig(
    task_type=TaskType.CAUSAL_LM,
    r=8,  # Rank
    lora_alpha=16,  # Alpha scaling
    lora_dropout=0.1,
    target_modules=[
        "q_proj", "k_proj", "v_proj", "o_proj",
        "gate_proj", "up_proj", "down_proj"
    ],
    bias="none"
)

# Apply LoRA to model
model = get_peft_model(model, lora_config)

# Now ready for task-specific fine-tuning!
# Only ~1% of parameters are trainable
print(f"Trainable parameters: {model.num_parameters(only_trainable=True):,}")

🎨 Adapter Examples

This model shines when fine-tuned with adapters for specific tasks. Here are some examples:

📊 Math Reasoning Adapter

# Train a math specialist (from the framework)
python scripts/train_task_adapters.py --task math --test

Sample Output:

Input: "What is 25% of 160?"
Output: "To find 25% of 160:
25% = 25/100 = 0.25
0.25 × 160 = 40
Therefore, 25% of 160 is 40."

💻 Code Generation Adapter

# Train a coding assistant
python scripts/train_task_adapters.py --task coding --test

Sample Output:

# Input: "Function to check if a number is prime"
def is_prime(n):
    if n < 2:
        return False
    for i in range(2, int(n**0.5) + 1):
        if n % i == 0:
            return False
    return True

✍️ Creative Writing Adapter

# Train a creative writing assistant
python scripts/train_task_adapters.py --task creative --test

Sample Output:

Input: "A robot discovers emotions"
Output: "Unit-7742 had processed millions of data points, but nothing had
prepared it for the strange sensation that flooded its circuits when it
witnessed the sunset. For the first time, efficiency seemed irrelevant."

🧠 Vocabulary Expansion for Distillation

Breaking the Vocabulary Barrier

One of the key challenges in knowledge distillation is vocabulary mismatch - your student model (50K tokens) can't directly learn from a teacher with a different vocabulary (150K tokens). Our vocabulary expansion tool solves this:

# Expand vocabulary to match any teacher model
python expand_vocab.py \
  --model_repo_id "shivash/MyAwesome-299M-Model" \
  --new_tokenizer_repo_id "Qwen/Qwen2-1.5B" \
  --output_dir "./MyAwesome-299M-Model-Qwen-Vocab"

What this does:

  • ✅ Preserves all existing knowledge from your 50K vocabulary
  • ✅ Adds new token capacity (e.g., 100K new tokens for Qwen2)
  • ✅ Intelligently initializes new embeddings (mean of existing weights)
  • ✅ Enables distillation from any teacher model
  • ✅ Ready for immediate use with the new tokenizer

Example expansions:

# For Qwen2 teachers (151K vocabulary)
python expand_vocab.py \
  --model_repo_id "shivash/MyAwesome-299M-Model" \
  --new_tokenizer_repo_id "Qwen/Qwen2-1.5B" \
  --output_dir "./expanded-qwen-vocab"

# For Llama 3 teachers (128K vocabulary)
python expand_vocab.py \
  --model_repo_id "shivash/MyAwesome-299M-Model" \
  --new_tokenizer_repo_id "meta-llama/Meta-Llama-3-8B" \
  --output_dir "./expanded-llama3-vocab"

After expansion, you can distill knowledge from any teacher model with that vocabulary! 🚀

🔧 Training Your Own Adapters

Method 1: Use the Framework Scripts

# Clone the Transfer-First LLM Framework
git clone https://github.com/your-username/transfer-first-llm.git
cd transfer-first-llm

# Install dependencies
pip install -e ".[dev]"

# Train custom adapters
python scripts/train_task_adapters.py --task reasoning --epochs 3 --test

Method 2: Manual Training

from transformers import TrainingArguments, Trainer
from peft import LoraConfig, get_peft_model
import torch

# Setup model with LoRA
model = AutoModelForCausalLM.from_pretrained("shivash/MyAwesome-299M-Model")
lora_config = LoraConfig(
    task_type="CAUSAL_LM",
    r=8, lora_alpha=16, lora_dropout=0.1,
    target_modules=["q_proj", "v_proj", "o_proj"]
)
model = get_peft_model(model, lora_config)

# Prepare your dataset
# dataset = your_formatted_dataset

# Training arguments
training_args = TrainingArguments(
    output_dir="./my-adapter",
    num_train_epochs=3,
    per_device_train_batch_size=4,
    learning_rate=1e-4,
    logging_steps=10,
)

# Train
trainer = Trainer(
    model=model,
    args=training_args,
    train_dataset=dataset,
    tokenizer=tokenizer
)
trainer.train()

# Save adapter
model.save_pretrained("./my-custom-adapter")

📈 Performance Characteristics

Efficiency Metrics

  • Training Time: 3-10 minutes per adapter (depending on data size)
  • Adapter Size: 8-16MB per specialized task
  • Memory During Training: <1GB GPU memory
  • Inference Speed: 50+ tokens/second

Task Performance

  • Knowledge Retention: Maintains base capabilities while adding specialization
  • Adaptation Speed: Few-shot learning with minimal data
  • Generalization: Strong transfer across related tasks
  • Robustness: Stable performance across different prompting styles

🎯 Recommended Use Cases

✅ Excellent For:

  • Educational tools (math tutoring, concept explanation)
  • Code assistance (function generation, debugging help)
  • Content creation (creative writing, technical docs)
  • Specialized reasoning (logic puzzles, problem decomposition)
  • Rapid prototyping of AI applications
  • Resource-constrained deployment

⚠️ Consider Limitations:

  • Base model size: 57M parameters is smaller than production models
  • Domain knowledge: May require fine-tuning for specialized fields
  • Context length: 1024 tokens may be limiting for long documents
  • Multilingual: Primarily trained on English content

🔬 Technical Details

Architecture Specifications

Model Architecture:
  Type: LlamaForCausalLM
  Layers: 8
  Hidden Size: 512
  Attention Heads: 8
  KV Heads: 4 (Grouped-Query Attention)
  Intermediate Size: 2048
  Vocab Size: 50257
  Max Position: 1024
  RMS Norm Epsilon: 1e-5

Optimizations:
  Attention: Grouped-Query for efficiency
  Activation: SiLU (Swish)
  Normalization: RMSNorm
  Position Encoding: Rotary (RoPE)

Memory Requirements

Model Loading:
  FP32: ~230MB
  FP16: ~115MB
  INT8: ~60MB

Training (with LoRA):
  Base Model: 115MB
  Gradients: ~1MB (only adapter params)
  Optimizer States: ~2MB
  Total: <200MB GPU memory

🛠 Framework Integration

This model is part of the Transfer-First LLM Framework, which provides:

  • Knowledge Distillation Pipeline: Create compact models from large teachers
  • Vocabulary Expansion Tools: Break vocabulary barriers for cross-model distillation
  • Adapter Training Scripts: Ready-to-use fine-tuning workflows
  • Multi-Task Composition: Combine multiple adapters dynamically
  • Evaluation Tools: Comprehensive testing and benchmarking
  • Deployment Utilities: Efficient inference and serving

Framework Repository

🔗 Transfer-First LLM Framework

🤝 Community & Contributions

Join the Community

  • GitHub Discussions: Share your adapter creations
  • Issues: Report bugs or request features
  • Pull Requests: Contribute improvements
  • Examples: Add your use cases to our gallery

Sharing Your Adapters

We encourage sharing trained adapters with the community:

  1. Train your adapter using the framework
  2. Test and document your results
  3. Upload to HuggingFace Hub with clear descriptions
  4. Tag with transfer-first-adapter for discoverability

📄 Citation

If you use this model in your research, please cite:

@misc{myawesome299m,
  title={MyAwesome-299M-Model: Efficient Language Model for Adapter-Based Transfer Learning},
  author={Shivash Puri},
  year={2024},
  url={https://huggingface.co/shivash/MyAwesome-299M-Model}
}

📋 License

This model is released under the MIT License. You are free to use, modify, and distribute it for both commercial and non-commercial purposes.

🙏 Acknowledgments

  • Framework: Built with the Transfer-First LLM Framework
  • Architecture: Inspired by Llama and modern transformer designs
  • Libraries: Powered by Transformers, PEFT, and PyTorch
  • Community: Thanks to the open-source AI community

🚀 Get Started Today!

Ready to build specialized AI for your use case? This model provides the perfect foundation for adapter-based fine-tuning.

Quick Links:

Built with ❤️ for efficient and accessible AI

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм · transformers

Можно запустить

Подбираем GPU…

Класс архитектуры
LlamaForCausalLM
Ревизия весов
7bda8a5

0 моделей