Friday, 27 June 2025

Teach Your AI New Tricks with InstructLab


 InstructLab is an open-source toolkit and workflow designed to fine-tune foundation models using a community-driven, taxonomy-based process.

 It enables experts—even those unfamiliar with ML—to contribute small “skill recipes” that enhance a model’s knowledge base.


How does it work?

  1. Install the CLI tool(ilab)
    1. pip install instructlab
  2. Initialize a project
    1. ilab config init  > It sets up a taxonomy repo and configuration.
  3. Download a base model
    1. ilab model download > such as IBM granite or Merlinite
    2. It downloads pre-trained models from HuggingFace
  4. List the downloaded model
    1. ilab model list
  5. Serve the model
    1. ilab model serve
  6. Chat with the model
    1. ilab model chat

Contribute knowledge

  1. Create skills via recipes 
    1. Add examples(question and answer: YAML format), 
  2. Add and validate your new data.
    1. ilab taxonomy diff
  3. Run synthetic data generation.
    1. ilab data generate
  4. Train or fine tune the model 
    1. ilab model train --pipeline=simple
  5. Serve the trained model
    1. ilab lodel serve --model-path <path>
  6. Chat with the model
    1. ilab model chat --model <model>
  7. Submit recipes as pull requests.


Understanding the Basics of Artificial Intelligence

 What exactly AI is and why everyone is talking about it.

Artificial intelligence, or AI, has now become a part of our daily lives, and many of us are not aware of that. It's working behind the scenes, quietly and efficiently. Few examples are: phone unlocking with facial recognition, a chatbot helping you book a flight, or Netflix suggesting your next favorite show.

What is Artificial Intelligence?

In simple terms, Artificial Intelligence refers to machines or software that mimic human intelligence. A machine can learn patterns and make predictions. AI does not replace human decision-making; instead, it adds value to human judgment.


Types of AI:

  • Narrow AI(Weak AI)
    •  AI is designed for a specific task.  eg, Siri, Google Maps, facial recognition
  • General AI (Strong AI)
    • AI that can understand, learn, and apply knowledge across a wide range of tasks, like humans. eg, Meta AI, GPT4
  • Super AI(AGI and ASI)
    • Hypothetical AI that surpasses human intelligence in all aspects. A future concept, not yet developed.

How does AI work?

AI systems are built using techniques like:
  • Machine Learning:
    • ML is a subset of AI that provides machines the ability to automatically learn and improve from experience without being explicitly programmed. Types of ML:
      • Supervised Learning
      • Unsupervised Learning
      • Reinforcement Learning
  • Deep Learning
    • A type of ML that mimics the human brain's network(neural network)
  • Natural Language Processing
    • Helps the computer understand human language.

Why AI Matters?

AI has the power to transform industries, improve efficiency, and solve global problems- from climate modeling to personalized education.

As AI continues to evolve, it will become even more integrated into our lives. The key is to use it responsibly. ensuring that it benefits society as a whole.