/ Модель

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

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

MobileLLM-1.5B

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

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

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

Бенчмарки

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

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

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

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

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

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

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

Модель принимает текст и генерирует текст. Она предназначена для локальных текстовых сценариев и оценки языковых моделей, включая тесты на рассуждение здравого смысла; доступна загрузка через Transformers для оценки или дальнейшего дообучения. README приводит результаты MobileLLM на наборах задач ARC, BoolQ, PIQA и других, но не раскрывает в предоставленных данных полный набор сравнительных чисел для версии 1.5B. Для неё требуется корректно настроить токенизатор: в README отмечено, что стандартный токенизатор не содержит специальных токенов. Метаданные указывают лицензию «other», без уточнения её условий.

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

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

Ограничения

README указывает контекст 2 тыс. токенов для семейства и предупреждает, что стандартный токенизатор не содержит специальных токенов. Условия лицензии в метаданных обозначены как «other», но конкретные правила использования не приведены.

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

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

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

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

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-1.5B", use_fast=False)
model = AutoModelForCausalLM.from_pretrained("facebook/MobileLLM-1.5B", 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

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

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

Ревизия весов
3f6b4de

0 моделей