Skip to content

Commit

Permalink
fix: add description to Granite 7B (#2059)
Browse files Browse the repository at this point in the history
Fixes #1881

Signed-off-by: Jeff MAURY <[email protected]>
  • Loading branch information
jeffmaury authored Nov 6, 2024
1 parent 0e1ba0e commit 38aa942
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/backend/src/assets/ai.json
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@
{
"id": "hf.instructlab.granite-7b-lab-GGUF",
"name": "instructlab/granite-7b-lab-GGUF",
"description": "# InstructLab Granite 7B",
"description": "# Model Card for Granite-7b-lab [Paper](https://arxiv.org/abs/2403.01081) \n\n### Overview\n\n![Screenshot 2024-02-22 at 11.26.13 AM.png](https://huggingface.co/instructlab/granite-7b-lab/resolve/main/model-card/Model%20Card%20for%20Merlinite%207b%2028cc0b72cf574a4a828140d3539ede4a_Screenshot_2024-02-22_at_11.26.13_AM.png)\n\n### Performance\n\n| Model | Alignment | Base | Teacher | MTBench (Avg) * | MMLU(5-shot) |\n| --- | --- | --- | --- | --- | --- |\n| [Llama-2-13b-chat-hf](https://huggingface.co/meta-llama/Llama-2-13b-chat-hf) | RLHF | Llama-2-13b | Human Annotators | 6.65 |54.58 | \n| [Orca-2-13b](https://huggingface.co/microsoft/Orca-2-13b) | Progressive Training | Llama-2-13b | GPT-4 | 6.15 | 60.37 * |\n| [WizardLM-13B-V1.2](https://huggingface.co/WizardLM/WizardLM-13B-V1.2) | Evol-Instruct | Llama-2-13b | GPT-4 | 7.20 | 54.83 |\n| [Labradorite-13b](https://huggingface.co/ibm/labradorite-13b) | Large-scale Alignment for chatBots (LAB) | Llama-2-13b | Mixtral-8x7B-Instruct | 7.23 | 58.89 |\n| [Mistral-7B-Instruct-v0.1](https://huggingface.co/mistralai/Mistral-7B-Instruct-v0.1) | SFT | Mistral-7B-v0.1 | - | 6.84 | 60.37 |\n| [zephyr-7b-beta](https://huggingface.co/HuggingFaceH4/zephyr-7b-beta) | SFT/DPO | Mistral-7B-v0.1 | GPT-4 | 7.34 | 61.07 |\n| [Mistral-7B-Instruct-v0.2](https://huggingface.co/mistralai/Mistral-7B-Instruct-v0.2) | SFT | Mistral-7B-v0.1 | - | 7.6** | 60.78 | \n| [Merlinite-7b-lab](https://huggingface.co/instructlab/merlinite-7b-lab) | Large-scale Alignment for chatBots (LAB) | Mistral-7B-v0.1 | Mixtral-8x7B-Instruct | 7.66 |64.88 | \n| Granite-7b-lab | Large-scale Alignment for chatBots (LAB) | Granite-7b-base| Mixtral-8x7B-Instruct | 6.69 | 51.91 |\n\n[*] Numbers for models other than Merlinite-7b-lab, Granite-7b-lab and [Labradorite-13b](https://huggingface.co/ibm/labradorite-13b) are taken from [lmsys/chatbot-arena-leaderboard](https://huggingface.co/spaces/lmsys/chatbot-arena-leaderboard)\n\n[**] Numbers taken from [MistralAI Release Blog](https://mistral.ai/news/la-plateforme/)\n\n### Method\n\nLAB: **L**arge-scale **A**lignment for chat**B**ots is a novel synthetic data-based alignment tuning method for LLMs from IBM Research. Granite-7b-lab is a Granite-7b-base derivative model trained with the LAB methodology, using Mixtral-8x7b-Instruct as a teacher model.\n\nLAB consists of three key components:\n\n1. Taxonomy-driven data curation process\n2. Large-scale synthetic data generator\n3. Two-phased-training with replay buffers\n\n![Untitled](https://huggingface.co/instructlab/granite-7b-lab/resolve/main/model-card/Model%20Card%20for%20Merlinite%207b%2028cc0b72cf574a4a828140d3539ede4a_Untitled.png)\n\nLAB approach allows for adding new knowledge and skills, in an incremental fashion, to an already pre-trained model without suffering from catastrophic forgetting.\n\nTaxonomy is a tree of seed examples that are used to prompt a teacher model to generate synthetic data. Taxonomy allows the data curator or the model designer to easily specify a diverse set of the knowledge-domains and skills that they would like to include in their LLM. At a high level, these can be categorized into three high-level bins - knowledge, foundational skills, and compositional skills. The leaf nodes of the taxonomy are tasks associated with one or more seed examples.\n\n![Untitled](https://huggingface.co/instructlab/granite-7b-lab/resolve/main/model-card/Model%20Card%20for%20Merlinite%207b%2028cc0b72cf574a4a828140d3539ede4a_Untitled%201.png)\n\nDuring the synthetic data generation, **unlike previous approaches where seed examples are uniformly drawn from the entire pool (i.e. self-instruct), we use the taxonomy to drive the sampling process**: For each knowledge/skill, we only use the local examples within the leaf node as seeds to prompt the teacher model.\nThis makes the teacher model better exploit the task distributions defined by the local examples of each node and the diversity in the taxonomy itself ensures the entire generation covers a wide range of tasks, as illustrated below. In turns, this allows for using Mixtral 8x7B as the teacher model for generation while performing very competitively with models such as ORCA-2, WizardLM, and Zephyr Beta that rely on synthetic data generated by much larger and capable models like GPT-4.\n\n![intuition.png](https://huggingface.co/instructlab/granite-7b-lab/resolve/main/model-card/Model%20Card%20for%20Merlinite%207b%2028cc0b72cf574a4a828140d3539ede4a_intuition.png)\n\nFor adding new domain-specific knowledge, we provide an external knowledge source (document) and prompt the model to generate questions and answers based on the document.\nFoundational skills such as reasoning and compositional skills such as creative writing are generated through in-context learning using the seed examples from the taxonomy. \n\nAdditionally, to ensure the data is high-quality and safe, we employ steps to check the questions and answers to ensure that they are grounded and safe. This is done using the same teacher model that generated the data. \n\nOur training consists of two major phases: knowledge tuning and skills tuning. \nThere are two steps in knowledge tuning where the first step learns simple knowledge (short samples) and the second step learns complicated knowledge (longer samples).\nThe second step uses replay a replay buffer with data from the first step.\nBoth foundational skills and compositional skills are learned during the skills tuning phases, where a replay buffer of data from the knowledge phase is used.\nImportantly, we use a set of hyper-parameters for training that are very different from standard small-scale supervised fine-training: larger batch size and carefully optimized learning rate and scheduler.\n\n![Untitled](https://huggingface.co/instructlab/granite-7b-lab/resolve/main/model-card/Model%20Card%20for%20Merlinite%207b%2028cc0b72cf574a4a828140d3539ede4a_Untitled%202.png)\n\n## Model description\n- **Model Name**: Granite-7b-lab\n- **Language(s):** Primarily English\n- **License:** Apache 2.0\n- **Base model:** [ibm/granite-7b-base](https://huggingface.co/ibm/granite-7b-base)\n- **Teacher Model:** [mistralai/Mixtral-8x7B-Instruct-v0.1](https://huggingface.co/mistralai/Mixtral-8x7B-Instruct-v0.1)\n\n## Prompt Template\n\n```python\nsys_prompt = \"You are an AI language model developed by IBM Research. You are a cautious assistant. You carefully follow instructions. You are helpful and harmless and you follow ethical guidelines and promote positive behavior.\"\nprompt = f'<|system|>\\n{sys_prompt}\\n<|user|>\\n{inputs}\\n<|assistant|>\\n'\nstop_token = '<|endoftext|>'\n```\n\nWe advise utilizing the system prompt employed during the model's training for optimal inference performance, as there could be performance variations based on the provided instructions. \n\n\n\n**Bias, Risks, and Limitations**\n\nGranite-7b-lab is a base model and has not undergone any safety alignment, there it may produce problematic outputs. In the absence of adequate safeguards and RLHF, there exists a risk of malicious utilization of these models for generating disinformation or harmful content. Caution is urged against complete reliance on a specific language model for crucial decisions or impactful information, as preventing these models from fabricating content is not straightforward. Additionally, it remains uncertain whether smaller models might exhibit increased susceptibility to hallucination in ungrounded generation scenarios due to their reduced sizes and memorization capacities. This aspect is currently an active area of research, and we anticipate more rigorous exploration, comprehension, and mitigations in this domain.",
"registry": "Hugging Face",
"license": "Apache-2.0",
"url": "https://huggingface.co/instructlab/granite-7b-lab-GGUF/resolve/main/granite-7b-lab-Q4_K_M.gguf",
Expand Down

0 comments on commit 38aa942

Please sign in to comment.