Model
A model is a program that has been trained on a set of data to recognize certain patterns or make certain decisions without further human intervention.
Model = Trained Algorithm + Data
Inferences
Process of running unseen data through a trained AI model to make a prediction or solve a task
- Inference is an ML model in action.
How to select the right model?
1. Define the need
- What is the use case: classification, generation, summarization, etc.
2. Shortlist candidates
Research existing models that fit the requirements. - Consider open-source vs. closed-source models. - Compare model sizes and capabilities. - Evaluate the model's performance on relevant benchmarks and tasks. - arena
3. Evaluate the model
- Use metrics like accuracy, precision, recall, F1 score, etc
4. Test Selected Model
- Test the model on a small sample of your data to see how it performs in practice.
Choosing the Right Model Size
Different tasks require different model sizes.
| Model Size | Capabilities | Example Tasks |
|---|---|---|
1B parameters |
Basic tasks | Sentiment classification, simple Q&A |
10B parameters |
Moderate reasoning | Chatbots, content generation |
100B+ parameters |
Complex reasoning | Brainstorming assistants, code generation |
Closed vs Open Source Models
There are two major deployment strategies.
Closed Source Models
Examples:
- OpenAI
- Anthropic
Advantages:
- Strong performance: often better than open source
- Easy API integration
- Less expensive
Disadvantages:
- Vendor lock-in
- Data privacy concerns
Open Source Models
Examples:
- LLaMA
- Mistral
- Falcon
Advantages:
- Full control
- On-prem deployment
- Better privacy
Disadvantages:
- Infrastructure complexity
- Weaker models (sometimes)
