/ Модель

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

Контекст
2 048 токенов
Параметры
1,7 млрд
Лицензия
MIT
Архитектура
phi · dense
Опубликована
10 сен 2023

phi-1_5

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

Базовая англоязычная языковая модель Microsoft на 1,7 млрд параметров для генерации текста, ответов на вопросы, кратких изложений и кода.

56 528скачиваний за 30 дней1 365лайковвеса обновлены24 ноя 2025

Бенчмарки

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

Тесты пользователейпока нет

Никто ещё не опубликовал тест этой модели. Соберите бенчмарк из своих задач — результат появится здесь.

  1. Добавьте модель в бенчмарк

    Вместе с другими моделями категории «Текст» — сравнение идёт внутри одной категории.

  2. Опишите свои задачи

    Напишите запросы, при необходимости приложите файлы и эталонные ответы.

  3. Запустите и опубликуйте

    Модели ответят на каждую задачу, судья оценит ответы. Опубликованный результат появится на этой странице.

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

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

  • MATH Lvl 5

    MATH Lvl 5 Raw · выше — лучше

    Результат

    0,0181

    Open LLM v2 · архив

    Публичная таблицадругая ревизия

  • BBH

    BBH Raw · выше — лучше

    Результат

    0,336

    Open LLM v2 · архив

    Публичная таблицадругая ревизия

  • IFEval

    IFEval Raw · выше — лучше

    Результат

    0,2033

    Open LLM v2 · архив

    Публичная таблицадругая ревизия

  • GPQA

    GPQA Raw · выше — лучше

    Результат

    0,2676

    Open LLM v2 · архив

    Публичная таблицадругая ревизия

  • MUSR

    MUSR Raw · выше — лучше

    Результат

    0,3404

    Open LLM v2 · архив

    Публичная таблицадругая ревизия

  • MMLU-PRO

    MMLU-PRO Raw · выше — лучше

    Результат

    0,1691

    Open LLM v2 · архив

    Публичная таблицадругая ревизия

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

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

Phi-1.5 — базовая языковая модель Microsoft на архитектуре Transformer с авторегрессионной генерацией текста. В метаданных указано 1,7 млрд параметров, контекст 2048 токенов и формат safetensors; модель работает с текстом и ориентирована прежде всего на английский язык. Она обучалась на тех же источниках, что и Phi-1, с добавлением синтетических текстов для задач NLP, и не проходила дообучение на следование инструкциям или RLHF.

Модель подходит для генерации и продолжения текста, ответов в формате вопросов и ответов, краткого изложения, творческого письма и генерации кода. Она может быть полезна для исследования языковых моделей и их безопасности. Microsoft выпустила её по лицензии MIT.

Phi-1.5 может выдавать неточные факты и код, плохо следовать сложным инструкциям и ошибаться при работе с неформальным английским и другими языками. Модель может отражать общественные предубеждения и генерировать вредный текст; README рекомендует проверять её результаты и указывает, что качество для производственных приложений не проверялось.

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

  • генерация и продолжение английского текста
  • ответы на вопросы в формате QA
  • краткое изложение текста
  • создание стихов, историй и черновиков писем
  • генерация фрагментов кода на Python
  • исследование безопасности и поведения языковых моделей

Ограничения

Модель не дообучалась для следования инструкциям и может давать нерелевантные продолжения, неточные факты и ошибки в коде; результаты следует проверять. Она может испытывать трудности с неформальным английским и другими языками, отражать предубеждения или генерировать вредный текст.

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

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

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

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

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

Открыть на Hugging Face

Model Summary

The language model Phi-1.5 is a Transformer with 1.3 billion parameters. It was trained using the same data sources as phi-1, augmented with a new data source that consists of various NLP synthetic texts. When assessed against benchmarks testing common sense, language understanding, and logical reasoning, Phi-1.5 demonstrates a nearly state-of-the-art performance among models with less than 10 billion parameters.

We did not fine-tune Phi-1.5 either for instruction following or through reinforcement learning from human feedback. The intention behind crafting this open-source model is to provide the research community with a non-restricted small model to explore vital safety challenges, such as reducing toxicity, understanding societal biases, enhancing controllability, and more.

For a safer model release, we exclude generic web-crawl data sources such as common-crawl from the training. This strategy prevents direct exposure to potentially harmful online content, enhancing the model's safety without RLHF. However, the model is still vulnerable to generating harmful content. We hope the model can help the research community to further study the safety of language models.

Phi-1.5 can write poems, draft emails, create stories, summarize texts, write Python code (such as downloading a Hugging Face transformer model), etc.

How to Use

Phi-1.5 has been integrated in the transformers version 4.37.0, please ensure that you are using a version equal or higher than it.

Intended Uses

Given the nature of the training data, Phi-1.5 is best suited for prompts using the QA format, the chat format, and the code format. Note that Phi-1.5, being a base model, often produces irrelevant text following the main answer. In the following example, we've truncated the answer for illustrative purposes only.

QA Format:

Write a detailed analogy between mathematics and a lighthouse.

Answer: Mathematics is like a lighthouse, guiding us through the vast ocean of numbers and calculations. Just as a lighthouse illuminates the darkness, mathematics provides us with a clear path to navigate through complex problems. It helps us make sense of the world around us, just like a lighthouse helps ships find their way home.

where the model generates the text after "Answer:".

Chat Format:

Alice: I don't know why, I'm struggling to maintain focus while studying. Any suggestions?

Bob: Have you tried using a timer? It can help you stay on track and avoid distractions.

Alice: That's a good idea. I'll give it a try.

Charlie: Another thing that can help is to break up your study sessions into smaller chunks. It's easier to concentrate on one thing at a time.

Alice: That makes sense. I'll try that too.

Bob: And don't forget to take breaks! It's important to give your brain a rest so you can come back to your studies with a fresh perspective.

Alice: Thanks for the advice, guys. I feel more motivated now.

Charlie: No problem, Alice. We're all in this together.

Bob: Yeah, and remember that it's okay to ask for help if you need it. We're here to support each other.

where the model generates the text after the first "Bob:".

Code Format:

def print_prime(n):
   """
   Print all primes between 1 and n
   """
   primes = []
   for num in range(2, n+1):
       is_prime = True
       for i in range(2, int(math.sqrt(num))+1):
           if num % i == 0:
               is_prime = False
               break
       if is_prime:
           primes.append(num)
   print(primes)

where the model generates the text after the comments.

Notes:

  • Phi-1.5-generated text/code should be treated as a starting point rather than a definitive solution for potential use cases. Users should be cautious when employing these models in their applications.

  • Phi-1.5 has not been tested to ensure that it performs adequately for any production-level application. Please refer to the limitation sections of this document for more details.

Sample Code

import torch
from transformers import AutoModelForCausalLM, AutoTokenizer

torch.set_default_device("cuda")

model = AutoModelForCausalLM.from_pretrained("microsoft/phi-1_5", torch_dtype="auto")
tokenizer = AutoTokenizer.from_pretrained("microsoft/phi-1_5")

inputs = tokenizer('''def print_prime(n):
   """
   Print all primes between 1 and n
   """''', return_tensors="pt", return_attention_mask=False)

outputs = model.generate(**inputs, max_length=200)
text = tokenizer.batch_decode(outputs)[0]
print(text)

Limitations of Phi-1.5

  • Generate Inaccurate Code and Facts: The model often produces incorrect code snippets and statements. Users should treat these outputs as suggestions or starting points, not as definitive or accurate solutions.

  • Limited Scope for code: If the model generates Python scripts that utilize uncommon packages or scripts in other languages, we strongly recommend users manually verify all API uses.

  • Unreliable Responses to Instruction: The model has not undergone instruction fine-tuning. As a result, it may struggle or fail to adhere to intricate or nuanced instructions provided by users.

  • Language Limitations: The model is primarily designed to understand standard English. Informal English, slang, or any other language outside of English might pose challenges to its comprehension, leading to potential misinterpretations or errors in response.

  • Potential Societal Biases: Regardless of the safe data used for its training, the model is not entirely free from societal biases. There's a possibility it may generate content that mirrors these societal biases, particularly if prompted or instructed to do so. We urge users to be aware of this and to exercise caution and critical thinking when interpreting model outputs.

  • Toxicity: Despite that the model is trained with carefully selected data, the model can still produce harmful content if explicitly prompted or instructed to do so. We chose to release the model for research purposes only -- We hope to help the open-source community develop the most effective ways to reduce the toxicity of a model directly after pretraining.

Training

Model

  • Architecture: a Transformer-based model with next-word prediction objective
  • Dataset size: 30B tokens
  • Training tokens: 150B tokens
  • Precision: fp16
  • GPUs: 32xA100-40G
  • Training time: 8 days

Software

License

The model is licensed under the MIT license.

Citation

You can find the paper at https://arxiv.org/abs/2309.05463. Please cite as:

@article{textbooks2,
  title={Textbooks Are All You Need II: \textbf{phi-1.5} technical report},
  author={Li, Yuanzhi and Bubeck, S{\'e}bastien and Eldan, Ronen and Del Giorno, Allie and Gunasekar, Suriya and Lee, Yin Tat},
  journal={arXiv preprint arXiv:2309.05463},
  year={2023}
}

Trademarks

This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow Microsoft’s Trademark & Brand Guidelines. Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party’s policies.

Data Summary

https://huggingface.co/microsoft/phi-1_5/blob/main/data_summary_card.md

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

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

GPU в ailist

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

Можно запустить

Подбираем GPU…

Класс архитектуры
PhiForCausalLM
Ревизия весов
77aa61e

0 моделей