/ Модель

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

Контекст
131 072 токена
Параметры
1,2 млрд
Лицензия
Llama 3.2
Архитектура
llama · dense
Базовая модель
Llama-3.2-1B-Instruct
Библиотека
transformers
Опубликована
19 янв 2025

PyThagorean-Tiny

Генерация текстаТекст → текст3 профессии
24скачиваний за 30 дней2лайкавеса обновлены20 янв 2025

Описание модели

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

Компактная дообученная модель LLaMA для решения математических задач, генерации Python-кода и объяснения решений в диалоге.

PyThagorean-Tiny — компактная текстовая авторегрессионная модель PrithivMLmods на архитектуре LLaMA, дообученная на базе meta-llama/Llama-3.2-1B-Instruct. Она содержит около 1,2 млрд параметров, использует dense-архитектуру LlamaForCausalLM и предназначена для генерации текста; заявленная длина контекста — 131 072 токена.

Модель ориентирована на решение задач по математике с помощью Python, генерацию кода для вычислений, пошаговые объяснения и учебные материалы. Также она поддерживает диалог на английском и, по README, многоязычные сценарии, включая поиск и суммаризацию математических сведений. Карточка описывает обучение на 1,5 млн примеров и применение SFT и RLHF; метаданные указывают датасет prithivMLmods/PyThagoreans-Merged.

Модель может ошибаться в сложных многошаговых и специализированных задачах, неоднозначно понимать запросы и генерировать код, зависящий от неустановленных Python-библиотек. Для корректной работы с кодом требуется проверка результатов. Лицензия — llama3.2; применяются условия лицензии Llama 3.2.

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

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

Ограничения

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

Публичные бенчмарки

Результаты из открытых лидербордов в сравнении с лидерами каталога

Публичных оценок пока нет

В подключённых источниках результатов этой модели не нашлось. Отсутствие оценки не значит, что модель хуже: её могли просто не проверять.

Источники: Hugging Face Leaderboards, Hugging Face Eval Results, Open LLM v2, MTEB, timm, Open ASR, EvalPlus, LLM Stats

Бенчмарки пользователейпока нет

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

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

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

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

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

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

    Модели ответят на каждую задачу, судья оценит ответы по шкале 0–100.

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

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

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

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

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

Открыть на Hugging Face

python.gif

PyThagorean-1B

PyThagorean [Python + Math] is a Python and mathematics-based model designed to solve mathematical problems using Python libraries and coding. It has been fine-tuned on 1.5 million entries and is built on LLaMA's architecture. The model supports different parameter sizes, including 10B, 3B, and 1B (Tiny). These instruction-tuned, text-only models are optimized for multilingual dialogue use cases, including agent-based retrieval and summarization tasks. PyThagorean leverages an auto-regressive language model that uses an optimized transformer architecture. The tuned versions employ supervised fine-tuning (SFT) and reinforcement learning with human feedback (RLHF) to align with human preferences for helpfulness and safety.

Use with transformers

Starting with transformers >= 4.43.0 onward, you can run conversational inference using the Transformers pipeline abstraction or by leveraging the Auto classes with the generate() function.

Make sure to update your transformers installation via pip install --upgrade transformers.

import transformers
import torch

model_id = "prithivMLmods/PyThagorean-Tiny"

pipeline = transformers.pipeline(
    "text-generation",
    model=model_id,
    model_kwargs={"torch_dtype": torch.bfloat16},
    device_map="auto",
)

messages = [
    {"role": "system", "content": "You are the helpful assistant. Solve the mathematical problem in Python programming."},
    {"role": "user", "content": "Find all real numbers $x$ such that \[\frac{x^3+2x^2}{x^2+3x+2} + x = -6.\]Enter all the solutions, separated by commas."},
]

outputs = pipeline(
    messages,
    max_new_tokens=256,
)
print(outputs[0]["generated_text"][-1])

Intended Use

  1. Mathematical Problem Solving:
    PyThagorean is designed for solving complex mathematical problems, including algebra, calculus, trigonometry, and more, by leveraging Python-based libraries. It is ideal for educational tools, tutoring platforms, and automated math assistants.

  2. Python Code Generation:
    The model generates Python code snippets for mathematical computations, simulations, and problem-solving, making it valuable for developers, researchers, and students.

  3. Multilingual Dialogue Systems:
    With support for multiple languages, PyThagorean can assist users worldwide in understanding and solving mathematical problems through dialogue-based interfaces.

  4. Instruction-Following Tasks:
    The model excels at adhering to precise mathematical instructions and delivering accurate, step-by-step solutions for problems embedded in text.

  5. Agent-Based Knowledge Retrieval:
    PyThagorean can retrieve and summarize mathematical concepts or problem-solving techniques, enabling quick access to relevant knowledge for educational and research purposes.

  6. Educational Content Creation:
    It generates educational content such as example problems, solutions, and Python-based tutorials, aiding teachers and content creators.

  7. Summarization and Explanation:
    The model provides clear explanations and breakdowns of mathematical solutions, helping users understand the rationale and process behind the answers.

Limitations

  1. Performance on Ambiguous Instructions:
    The model may struggle with ambiguous, vague, or poorly framed mathematical instructions, potentially leading to incorrect or incomplete solutions.

  2. Edge Cases and Special Scenarios:
    For highly specialized or niche mathematical problems, especially those not commonly encountered in training data, the model's performance may degrade.

  3. Errors in Multi-Step Reasoning:
    While trained on reasoning datasets, the model may sometimes produce incorrect results for multi-step or highly complex reasoning tasks, particularly if intermediate steps are not explicitly defined.

  4. Bias Toward Common Solutions:
    The model may favor standard or commonly used approaches to mathematical problems, potentially missing creative or less conventional methods of solution.

  5. Resource Intensity:
    As a large-scale model, PyThagorean requires significant computational resources, including high-end GPUs, for efficient inference and deployment.

  6. Context Window Limitations:
    The model's finite context window may lead to incomplete understanding or truncated responses for problems requiring extensive context or lengthy input.

  7. Handling of Non-Mathematical Queries:
    While capable of engaging in general conversations, its performance for non-mathematical tasks may not match models specifically tuned for broader use cases.

  8. Dependency on Python Libraries:
    Generated solutions may rely on specific Python libraries or functions, which users must have installed and configured correctly to execute the code successfully.

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

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

GPU в ailist

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

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

Подбираем GPU…

Класс архитектуры
LlamaForCausalLM
Ревизия весов
34fe14e

0 моделей