/ Модель

Характеристики

Контекст
32 768 токенов
Параметры
7,1 млрд
Размер весов
14,5 ГБ
Лицензия
Apache 2.0
Архитектура
bamboo · dense
Опубликована
22 мар 2024

Bamboo-DPO-v0_1

Генерация текстаТекст → текст

Англоязычная языковая модель Bamboo на 7 млрд параметров с разреженной архитектурой для генерации текста и извлечения признаков.

13скачиваний за 30 дней7лайковвеса обновлены7 июн 2024

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Публичные оценки

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

В подключённых источниках результатов для этой модели пока нет.

Что умеет модель

Описание составлено по карточке модели и метаданным Hugging Face

Bamboo-DPO-v0_1 — англоязычная плотная языковая модель семейства Bamboo, разработанная для эффективного вывода за счёт разреженных вычислений. Карточка описывает архитектуру Bamboo на 7 млрд параметров: в блоке FFN после GLU добавлена dReLU, что, по заявлению авторов, обеспечивает около 85% разреженности. Модель принимает текст и генерирует текст; контекст составляет 32 768 токенов.

Модель предназначена для генерации текста и извлечения признаков, а также для оценки и выполнения общих языковых задач. В карточке приведены результаты на MMLU, GSM8K, HumanEval и других бенчмарках, сопоставимые с Mistral-7B по среднему показателю. Репозиторий использует формат Safetensors и лицензию Apache-2.0.

Модель обучалась на 150 млрд токенов и преимущественно на английских данных; авторы предупреждают о более слабых возможностях на других языках и возможных пробелах в отдельных задачах. README описывает Bamboo и разреженную архитектуру, но не подтверждает связь этой версии с DPO или указывает базовую модель, поэтому происхождение версии Bamboo-DPO-v0_1 нельзя установить уверенно.

Сценарии применения

  • генерация ответов и продолжений на английском языке
  • извлечение признаков из текста
  • решение математических задач на английском языке
  • генерация кода по текстовому запросу
  • оценка языковых моделей на общих бенчмарках

Ограничения

Обучение проводилось на 150 млрд токенов, поэтому возможны пробелы в отдельных задачах. Модель обучалась преимущественно на англоязычных данных и может заметно хуже работать на других языках.

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

Introducation

Sparse computing is increasingly recognized as an important direction to improve the computational efficiency (e.g., inference speed) of large language models (LLM).

Recent studies (Zhang el al., 2021; Liu et al., 2023; Mirzadeh et al., 2023) reveal that LLMs inherently exhibit properties conducive to sparse computation when employing the ReLU activation function. This insight opens up new avenues for inference speed, akin to MoE's selective activation. By dynamically choosing model parameters for computation, we can substantially boost inference speed.

However, the widespread adoption of ReLU-based models in the LLM field remains limited. Here we introduce a new 7B ReLU-based LLM, Bamboo (Github link:https://github.com/SJTU-IPADS/Bamboo), which boasts nearly 85% sparsity and performance levels on par with Mistral-7B.

Model Architecture

To push the model's sparsity, we add a ReLU component after GLU component, called dReLU(double ReLU). So our FFN network works as follows:

class BambooMLP(nn.Module):                                                                                                                   
    def __init__(self, config):                                                                                                                
        super().__init__()                                                                                                                     
        self.config = config                                                                                                                   
        self.hidden_size = config.hidden_size                                                                                                  
        self.intermediate_size = config.intermediate_size                                                                                      
        self.gate_proj = nn.Linear(self.hidden_size, self.intermediate_size, bias=False)                                                       
        self.up_proj = nn.Linear(self.hidden_size, self.intermediate_size, bias=False)                                                         
        self.down_proj = nn.Linear(self.intermediate_size, self.hidden_size, bias=False)                                                       
        self.act_fn = ACT2FN[config.hidden_act]                                                                                                
                                                                                                                                               
    def forward(self, x):                                                                                                                      
        return self.down_proj(self.act_fn(self.gate_proj(x)) * self.act_fn(self.up_proj(x)))

Training Details

In this section, we introduce the details of training our model, including types of data used, and hyperparameters.

We initialized the model weights to Mistral's model weights and modified the FFN structure to the dReLU structure, then continued pre-training for 200B tokens, divided into two phases:

First phase: For the proportion of training corpus, we followed the data mix ratio and sources of the StableLM-3B model (link), conducting a further pre-training with 150B tokens.

The following table shows the hyper-paramters we used in our training process.

Hyper-parameters
GPUs64 80G-A800
Learning Rate ControlCosine
Peak Learning Rate5e-5
Batch Size4M
Weight Decay0.1
Context Length2k

Second phase: We further adjusted the training corpus ratio, incorporating more domain-specific datasets (e.g., Math, Coding), and continued training for 50B tokens.

Hyper-parameters
GPUs64 80G-A800
Learning Rate ControlCosine
Peak Learning Rate5e-6
Batch Size4M
Weight Decay0.01
Context Length4k

Performance Evaluation Results

Our evaluation is based on the framework lm-evaluation-harness and opencompass. The evaluation details are listed as follows:

  • Huggingface LLM Leaderboard tasks.
  • Other Popular Benchmarks: We report the average accuracies on Big Bench Hard (BBH) (3-shot), HumanEval.
AverageMMLUWinograndeTruthfulQAHellaswagGSM8KArc-CHumanEvalBBH
Bamboo57.163.8976.1644.0682.1752.8462.2025.650.35
Mistral-v0.156.562.6579.2442.6283.3240.1861.4326.2156.35

Inference Speed Evaluation Results

We utilize PowerInfer, a state-of-the-art acceleration framework leveraging activation sparsity. Here we show the inference speed compared with llama.cpp/transformers.

Limitation & Disclaimer

  • Bamboo, having undergone training with only 150B tokens, may still exhibit performance gaps in certain tasks.
  • The Bamboo model has only been trained on English-language datasets, hence its capabilities in other languages are still lacking.
  • The model may produce unexpected outputs due to its size and probabilistic generation paradigm.

License

The code is licensed under Apache-2.0, while model weights are fully open for academic research and also allow free commercial usage.

Citation

Please kindly cite using the following BibTeX:

@misc{bamboo,
    title={Bamboo: Harmonizing Sparsity and Performance in Large Language Models}, 
    author={Yixin Song, Haotong Xie, Zeyu Mi, Li Ma, Haibo Chen},
    year={2024}
}

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм

Нельзя запустить

Модели нужен код из репозитория; автор пока не в списке доверенных организаций.

Класс архитектуры
BambooForCausalLM
Ревизия весов
200c173

0 моделей