/ Модель

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

Лицензия
Своя лицензия
Библиотека
transformers
Опубликована
31 окт 2024

MobileLLM-1B

Генерация текстаТекст → текст3 профессии

Компактная авторегрессионная модель Meta для генерации текста и локального применения на устройствах с ограниченными ресурсами.

57скачиваний за 30 дней122лайкавеса обновлены5 мая 2025

Бенчмарки

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

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

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

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

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

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

MobileLLM-1B — авторегрессионная языковая модель семейства MobileLLM, разработанная Meta и представленная в работе для ICML 2024. Она предназначена для генерации текста и запуска на устройствах с ограниченными ресурсами. В архитектуре Transformer используются активация SwiGLU, глубокая и узкая конфигурация слоёв, общие эмбеддинги и grouped-query attention.

Модель обучена на открытых интернет-данных; в README для семейства указан контекст 2 тыс. токенов и текстовый ввод и вывод. Для MobileLLM-1B приведено сравнение с другими моделями на тестах рассуждения здравого смысла без примеров; карточка описывает предобученную модель, доступную для оценки и дальнейшего дообучения. Основной язык в метаданных — английский. Лицензия указана как other, поэтому точные условия использования следует сверить с лицензией репозитория.

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

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

Ограничения

Контекст семейства указан как 2 тыс. токенов, что ограничивает работу с длинными текстами. Для репозитория приведена лицензия other, поэтому условия коммерческого и иного использования нужно уточнить по лицензионным материалам модели.

Для каких профессий подходит3

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

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

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

Открыть на Hugging Face

Model Details

MobileLLM is introduced: "MobileLLM: Optimizing Sub-billion Parameter Language Models for On-Device Use Cases", published in ICML 2024.

Model Developer: Meta

Model Architecture: MobileLLM is an auto-regressive language model leveraging an optimized transformer architecture, specifically engineered for on-device applications with constrained resources. MobileLLM integrated several key techniques including: (1) SwiGLU activation function, (2) deep and thin architectures, (3) embedding sharing, (4) grouped-query attention. MobileLLM-125M/350M attains a remarkable 2.7%/4.3% accuracy boost over preceding 125M/350M SoTA models on zero-shot commonsense reasoning tasks. In our updated version, we further demonstrate that our design philosophy scales effectively to larger models, with SoTA results for MobileLLM-600M/1B/1.5B.

image/jpeg

# Layers# Attnetion Heads# KV HeadsToken DimensionParams
MobileLLM-125M3093576124.6M
MobileLLM-350M32155960345.3M
MobileLLM-600M401861152603.1M
MobileLLM-1B5420512801.01B
MobileLLM-1.5B5425516001.51B
Training DataInput modalitiesOutput modalitiesContext LengthGQAShared EmbeddingsToken count
MobileLLM-125MPublicly available online data.TextText2kYesYes1T tokens
MobileLLM-350MPublicly available online data.TextText2kYesYes1T tokens
MobileLLM-600MPublicly available online data.TextText2kYesYes1T tokens
MobileLLM-1BPublicly available online data.TextText2kYesYes1T tokens
MobileLLM-1.5BPublicly available online data.TextText2kYesYes1T tokens

How to use

We are providing 2 ways to run the model:

HuggingFace

MobileLLM codebase

HuggingFace

To load the pretrained model for further finetuning or evaluation:

from transformers import AutoModelForCausalLM, AutoTokenizer
tokenizer = AutoTokenizer.from_pretrained("facebook/MobileLLM-1B", use_fast=False)
model = AutoModelForCausalLM.from_pretrained("facebook/MobileLLM-1B", trust_remote_code=True)

Note that the default tokenizer does not contain special tokens. For example you can use:

tokenizer.add_special_tokens(
    {
        "eos_token": "</s>",
        "bos_token": "<s>",
        "unk_token": "<unk>",
    }
)

MobileLLM codebase

We provide the pretraining code in https://github.com/facebookresearch/MobileLLM

> git clone https://github.com/facebookresearch/MobileLLM
> pip install -r requirement.txt

# data pre-process and specify the data path in pretrain.sh
# run pretraining
> bash pretrain.sh 

We also provide evaluation script for calculating ppl of wikitext-2 test split:

> bash eval.sh

You can find more details in the GitHub repo.

Training cost

It takes the following number of days to train MobileLLM on 1T tokens using 32 NVIDIA A100 80G GPUs.

125M350M600M1B1.5B
~3 days~6 days~8 days~12 days~18 days

Evaluation

We evaluate the pretrained MobileLLM models on Zero-shot Common Sense Reasoning tasks

MobileLLM-125M

modelarc_easyarc_challengeboolqpiqasiqahellaswagobqawinograndeavg.
OPT-125M41.325.257.562.041.931.131.250.842.6
GPT-neo-125M40.724.861.362.541.929.731.650.742.9
Pythia-160M40.025.359.562.041.529.931.250.942.5
MobileLLM-125M43.927.160.265.342.438.939.553.146.3
MobileLLM-LS-125M45.828.760.465.742.939.541.152.147.0

MobileLLM-350M

modelarc_easyarc_challengeboolqpiqasiqahellaswagobqawinograndeavg.
OPT-350M41.925.754.064.842.636.233.352.443.9
Pythia-410M47.130.355.367.243.140.136.253.446.6
MobileLLM-350M53.833.562.468.644.749.640.057.651.3
MobileLLM-LS-350M54.432.562.869.844.150.645.857.252.1

MobileLLM-600M

modelarc_easyarc_challengeboolqpiqasiqahellaswagobqawinograndeavg.
Qwen1.5-500M54.732.146.968.946.048.837.755.048.8
BLOOM-560M43.727.553.765.142.536.532.652.244.2
MobiLlama-800M52.031.754.673.043.352.342.556.350.7
MobileLLM-600M58.135.861.072.344.955.947.958.654.3

MobileLLM-1B

modelarc_easyarc_challengeboolqpiqasiqahellaswagobqawinograndeavg.
Pythia-1B49.930.458.769.243.347.438.652.248.7
MobiLlama-1B59.738.459.274.544.962.043.759.055.2
Falcon-1B59.538.463.974.644.662.945.660.956.3
BLOOM-1.1B47.627.358.667.042.442.236.653.846.9
TinyLlama-1.1B59.237.158.172.943.959.144.758.854.2
MobileLLM-1B63.039.066.774.445.061.446.862.357.3

MobileLLM-1.5B

modelarc_easyarc_challengeboolqpiqasiqahellaswagobqawinograndeavg.
GPT-neo-1.3B51.333.061.870.943.748.641.254.550.6
OPT-1.3B54.431.758.471.544.753.744.659.152.3
BLOOM-1.7B50.931.261.770.043.247.236.256.149.6
Qwen1.5-1.8B61.136.568.374.147.260.442.961.256.5
GPT-neo-2.7B55.834.362.472.943.655.640.057.952.8
OPT-2.7B56.634.661.874.545.660.248.259.655.1
Pythia-2.8B59.438.966.173.844.559.645.059.455.8
BLOOM-3B55.133.662.170.543.253.941.658.252.3
MobileLLM-1.5B67.540.965.774.846.464.550.564.759.4

Acknowledgement

This code is partially based on HuggingFace Transformers repo under Apache License.

Citation

If you find our code useful for your research, please consider citing:

@article{liu2024mobilellm,
    title={MobileLLM: Optimizing Sub-billion Parameter Language Models for On-Device Use Cases},
    author={Liu, Zechun and Zhao, Changsheng and Iandola, Forrest and Lai, Chen and Tian, Yuandong and Fedorov, Igor and Xiong, Yunyang and Chang, Ernie and Shi, Yangyang and Krishnamoorthi, Raghuraman and others},
    journal={arXiv preprint arXiv:2402.14905},
    year={2024}
}

License

MobileLLM is FAIR NC licensed as of now

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

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

GPU в ailist

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

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

Доступ к модели ограничен автором; у платформы нет доступа к весам.

Ревизия весов
7c59a43

0 моделей