Community Model Build
We have Published our First Community Model!
Our first community model has been published to granite-3.0-8b-lab-community! This is a really exciting milestone for the InstructLab project as it symbolizes a kind of stability that the developer team has been striving for the last few months.
For those unaware, our Community Model Build process is one in which we take contributions that have been approved to the instructlab/taxonomy repository, put them into a branch, and build a new LAB aligned model based on the contributions.
If the model proves to be of high enough fidelity and has learned the various skills or knowledge included in the build, we then publish it to HuggingFace!
This model build was based on ibm-granite/granite-3.0-8b-base, the first publicly available base model of the Granite 3.0 family of models. The team has previously published community LAB aligned models based on the granite-7b family of models. This first build of the community model is the first publicly available Granite 3.0 LAB aligned model with communiy data included.
How Does this Work?
This process of building and validating has taken the ilab
team a lot of effort to figure out, here is how it works generally:
- If you have existing data in ~/.local/share/instructlab/datasets or ~/.local/share/instructlab/phased, move it elsewhere! If you have existing data, generation and training might "resume" from data found in these directories rather than starting fresh.
- Mix in the InstructLab community dataset:
cd ~/.local/share/instructlab/datasets/
wget https://huggingface.co/datasets/instructlab/InstructLabCommunity/resolve/main/instructlab_community.jsonl
cd ~
This process is to ensure the model see’s enough data. Without the community dataset mixed in, it’s likely your overall amount of samples will be too low and you might notice the model forgetting or hallucinating more.
- modify
use_legacy_tmpl
to betrue
in thegeneral:
section of your config viailab config edit
. This step specifically is to support the granite 3.0 family of models on ibm-granite’s HuggingFace. - run
ilab data generate
- run multi-phase training:
ilab model train --strategy lab-multiphase --phased-phase1-data /home/instructlab/.local/share/instructlab/datasets/knowledge_train_msgs_*.jsonl --phased-phase2-data /home/instructlab/.local/share/instructlab/datasets/skills_train_msgs_*.jsonl --skip-user-confirm --force-clear-phased-cache
Key Differences in this Process
Multi-Phase training is probably the most un-recognizable step for upstream users. This strategy of training uses the accelerated
training library. This type of training is called Multi-Phase because is basically runs training twice: Phase 1 is knowledge training and automatically promotes the 7th epoch’s checkpoint to be the basis of Phase 2. Phase 2 is skills training, and is where you will notice a larger amount of steps due to the mixing of the community dataset. This Phase runs MT-Bench
: an industry standard skills benchmark at the end of training. The checkpoint with the best MT-Bench score is chosen as the final training checkpoint to use.
The MT-Bench scores range from 0-10, we typically aim for a checkpoint with a score of 6.5 and higher. Anything below 6 will typically have degraded performance.
This first community model build scored 6.676100628930818
. This is a great baseline as we anticipate the more skills and knowledge we add to this model, the higher the score will be over time!
Go Try it Out!
Go try out the model for yourself, you can test it against the Q&A yaml files included in this publicly available branch as these are the contributions we trained the base model on. The model is currently in Safetensors format and therefore requires GPUs or a carefuly installed version of vLLM with CPU support. Happy Instructing!