erynn-1-774m / README.md
NextGenC's picture
Update README.md
59fff20 verified
|
raw
history blame
6.91 kB
metadata
language:
  - en
tags:
  - instruction-tuning
  - text-generation
  - conversational
  - fine-tuned
  - quantized
license: mit
base_model:
  - openai-community/gpt2

Erynn - 774M

Model Type Status

πŸ” Model Description

Erynn is a cutting-edge language model designed to understand and follow natural language instructions with remarkable precision. This model has been fine-tuned using a specialized adapter technique on a diverse instruction dataset to respond to various request types while maintaining excellent creative text generation abilities.

Using advanced 4-bit quantization techniques, Erynn delivers impressive performance while remaining lightweight enough for deployment on consumer-grade hardware - making sophisticated AI accessible without requiring enterprise-level infrastructure.

🌟 Key Capabilities

  • πŸ“ Creative Content Generation: Produces coherent, contextually relevant, and engaging text across diverse topics

  • 🎯 Instruction Understanding: Responds accurately to natural language instructions like "explain," "summarize," or "list"

  • πŸ“Š Information Organization: Structures and presents information in clear, accessible formats

  • πŸ”„ Format Flexibility: Adapts to different prompt styles and instruction formats

  • πŸ’‘ Concise Explanations: Provides clear, accessible explanations of complex topics

  • πŸ“± Hardware Efficient: Optimized to run on modest consumer hardware through advanced quantization

πŸš€ Technical Specifications

  • Model Type: Advanced transformer-based language model
  • Adaptation Method: Parameter-efficient fine-tuning with adapter layers
  • Quantization: 4-bit precision with double quantization
  • Training Approach: Instruction-focused fine-tuning on high-quality examples
  • Optimization: FP16 precision with optimized memory usage

πŸ’‘ Intended Uses

Erynn excels at a variety of text generation tasks:

  • πŸ“š Content Creation: Generate creative writing, stories, and descriptive content

  • πŸ” Question Answering: Provide informative responses to direct questions

  • πŸ“‹ List Creation: Generate structured lists on requested topics

  • πŸ“ Summarization: Condense longer texts into concise summaries

  • πŸ“£ Marketing Copy: Create engaging product descriptions or promotional content

  • πŸ’» Basic Code Examples: Generate simple code snippets for common tasks

πŸ“₯ Using Erynn

The model works best with simple prompt formats. Here's how to use it:

import torch
from transformers import AutoTokenizer, AutoModelForCausalLM

# Model paths
MODEL_PATH = "erynn/erynn-model"

def load_model():
   """Load the Erynn model and tokenizer."""
   # Load model with efficient memory usage
   model = AutoModelForCausalLM.from_pretrained(
       MODEL_PATH,
       device_map="auto",
       torch_dtype=torch.float16,
       low_cpu_mem_usage=True
   )
   
   # Load tokenizer
   tokenizer = AutoTokenizer.from_pretrained(MODEL_PATH)
   tokenizer.pad_token = tokenizer.eos_token
   return model, tokenizer

def get_response(model, tokenizer, instruction, context=None):
   """
   Generate a response for the given instruction and optional context.
   Example: get_response(model, tokenizer, "Write an ad for a phone")
   """
   # Build simple prompt
   prompt = f"Instruction: {instruction}\n"
   if context and context.strip():
       prompt += f"Context: {context}\n"
   prompt += "Response: "
   
   # Tokenize input
   inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
   
   # Generate response
   with torch.no_grad():
       output = model.generate(
           input_ids=inputs["input_ids"],
           attention_mask=inputs["attention_mask"],
           max_new_tokens=100,
           temperature=0.7,
           top_p=0.9,
           repetition_penalty=1.2,
           do_sample=True,
           pad_token_id=tokenizer.eos_token_id
       )
   
   # Extract response
   response = tokenizer.decode(output[0], skip_special_tokens=True)
   response_start = response.find("Response: ") + len("Response: ")
   return response[response_start:].strip()

## πŸ“Š Performance Examples

**Example 1: Explaining Concepts**  
Instruction: Explain artificial intelligence in simple terms.  
Response: Artificial Intelligence is the ability to learn from experience, adapt and change its behavior based on new data, and build upon existing knowledge to achieve a greater goal. The term AI refers to an intelligent system that learns by doing and becomes self-aware through repeated interaction with humans and other systems.

**Example 2: Summarizing Text**  
Instruction: Summarize this text in 30 words or less.  
Context: Deep learning is a key AI technology. It excels in computer vision and natural language processing, driving advances in image recognition and speech synthesis.  
Response: Deep learning uses deep neural networks to learn from massive amounts of data. It can be trained on large datasets containing billions of images, millions of sounds, and thousands of voices.

**Example 3: Product Advertisement**  
Instruction: Write a short advertisement for a smartwatch in 40 words.  
Response: Smartwatch is the new technology that helps you stay connected and get more done with less time and effort. It also allows you to check notifications, listen to music or read news on your wrist without having to take out a smartphone.

**Example 4: List Generation**  
Instruction: List three advantages of Python programming.  
Response:  
- Easy to learn and understand  
- Powerful code editor with syntax highlighting, indentation, comments and much more  
- Build your own custom modules with ease  

## πŸ”§ Hardware Requirements

Thanks to advanced quantization techniques, Erynn runs efficiently on standard hardware:

- **GPU**: NVIDIA GPU 3050 TΔ° 4GB VRAM
- **CPU**: Δ°ntel i7 12700H
- **RAM**: 16 GB

## πŸ› οΈ Limitations

- **Word Count Adherence**: May exceed specified word or length limits in instructions
- **Factual Accuracy**: Can occasionally present incorrect information as factual
- **Complex Reasoning**: May struggle with multi-step reasoning or complex logical tasks
- **Code Generation**: Basic code examples may contain errors or incomplete implementations
- **Context Length**: Limited context window may affect comprehension of longer texts

## πŸ“ Citation

If you use Erynn in your projects or research, please cite:
```bibtex
@software{erynn_2025,
  author = {Erynn AI Team},
  title = {Erynn: Modern Instruction-Tuned Language Model},
  year = {2025},
  url = {https://huggingface.co/NextGenC/Erynn-774M},
  description = {An efficient and lightweight instruction-tuned language model for versatile text generation}
}