/ Модель

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

Лицензия
Llama 3
Библиотека
transformers
Опубликована
21 авг 2024

CardinalOperations_-_ORLM-LLaMA-3-8B-gguf

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

ORLM-LLaMA-3-8B — языковая модель, разработанная Cardinal Operations и созданная на основе Meta Llama 3 8B с полной дообучкой на данных OR-Instruct.

1 564скачиваний за 30 дней0лайковвеса обновлены31 мая 2025

Бенчмарки

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

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

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

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

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

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

Эта GGUF-версия была квантизирована Richard Erkhov и предназначена для генерации математических моделей задач исследования операций и соответствующего Python-кода с использованием библиотеки coptpy. Модель рассчитана на обработку вопросов об оптимизации, сформулированных на естественном языке, и автоматизацию построения и решения оптимизационных моделей.

Модель имеет текстовую модальность и размер 8 млрд параметров в исходной версии. В репозитории представлены варианты GGUF с методами квантизации от Q2_K до Q8_0 и размером примерно от 2,96 до 7,95 ГБ, что позволяет выбирать компромисс между требованиями к памяти и качеством генерации. Заявлено улучшение автоматизации оптимизационного моделирования и высокие результаты на ряде бенчмарков. Сведения о поддерживаемых языках и размере контекстного окна отсутствуют; качество сгенерированных моделей и кода требует проверки пользователем. Лицензия указана как llama3.

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

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

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

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

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

Открыть на Hugging Face

ORLM-LLaMA-3-8B: A Large Language Model for Optimization Modeling

This repository contains the quantized model weights for ORLM-LLaMA-3-8B, a fine-tuned version of Meta's Llama 3 8B model, specifically trained for generating optimization models and corresponding Python code. It's presented in the paper ORLM: A Customizable Framework in Training Large Models for Automated Optimization Modeling. This model significantly improves the capability of automating optimization modeling and solving, achieving state-of-the-art performance on several benchmarks.

The official repo can be found here: https://github.com/Cardinal-Operations/ORLM

Quantization made by Richard Erkhov.

Github

Discord

Request more models

ORLM-LLaMA-3-8B - GGUF

NameQuant methodSize
ORLM-LLaMA-3-8B.Q2_K.ggufQ2_K2.96GB
ORLM-LLaMA-3-8B.IQ3_XS.ggufIQ3_XS3.28GB
ORLM-LLaMA-3-8B.IQ3_S.ggufIQ3_S3.43GB
ORLM-LLaMA-3-8B.Q3_K_S.ggufQ3_K_S3.41GB
ORLM-LLaMA-3-8B.IQ3_M.ggufIQ3_M3.52GB
ORLM-LLaMA-3-8B.Q3_K.ggufQ3_K3.74GB
ORLM-LLaMA-3-8B.Q3_K_M.ggufQ3_K_M3.74GB
ORLM-LLaMA-3-8B.Q3_K_L.ggufQ3_K_L4.03GB
ORLM-LLaMA-3-8B.IQ4_XS.ggufIQ4_XS4.18GB
ORLM-LLaMA-3-8B.Q4_0.ggufQ4_04.34GB
ORLM-LLaMA-3-8B.IQ4_NL.ggufIQ4_NL4.38GB
ORLM-LLaMA-3-8B.Q4_K_S.ggufQ4_K_S4.37GB
ORLM-LLaMA-3-8B.Q4_K.ggufQ4_K4.58GB
ORLM-LLaMA-3-8B.Q4_K_M.ggufQ4_K_M4.58GB
ORLM-LLaMA-3-8B.Q4_1.ggufQ4_14.78GB
ORLM-LLaMA-3-8B.Q5_0.ggufQ5_05.21GB
ORLM-LLaMA-3-8B.Q5_K_S.ggufQ5_K_S5.21GB
ORLM-LLaMA-3-8B.Q5_K.ggufQ5_K5.34GB
ORLM-LLaMA-3-8B.Q5_K_M.ggufQ5_K_M5.34GB
ORLM-LLaMA-3-8B.Q5_1.ggufQ5_15.65GB
ORLM-LLaMA-3-8B.Q6_K.ggufQ6_K6.14GB
ORLM-LLaMA-3-8B.Q8_0.ggufQ8_07.95GB

Original model description:

license: llama3

see our paper in https://arxiv.org/abs/2405.17743

github repo: https://github.com/Cardinal-Operations/ORLM

Model Details

LLaMA-3-8B-ORLM is fully fine-tuned on the OR-Instruct data and built with Meta LLaMA-3-8B model. More training details can be seen at https://arxiv.org/abs/2405.17743

Model Usage

Prompting Template:

Below is an operations research question. Build a mathematical model and corresponding python code using `coptpy` that appropriately addresses the question.

# Question:
{Question}

# Response:

Please replace the {Question} with any natural language OR question.

Examples

--------------------------OR question wrapped in the template--------------------------
Below is an operations research question. Build a mathematical model and corresponding python code using `coptpy` that appropriately addresses the question.

# Question:
A lab has 1000 units of medicinal ingredients to make two pills, a large pill and a small pill. A large pill requires 3 units of medicinal ingredients and 2 units of filler. A small pill requires 2 units of medicinal ingredients and 1 unit of filler. The lab has to make at least 100 large pills. However, since small pills are more popular at least 60% of the total number of pills must be small. How many of each should be made to minimize the total number of filler material needed?

# Response:
--------------------------top-1 completion output by LLaMA-3-8B-ORLM under greedy decoding--------------------------
## Mathematical Model:
To solve the lab's pill production problem, we need to construct a linear programming model to minimize the total number of filler material needed while satisfying the production requirements for the pills and the proportion constraint. Here is the model formulation:

### Decision Variables:
- \(x\): Number of large pills to be made.
- \(y\): Number of small pills to be made.

### Objective Function:
- Minimize the total number of filler material needed: \[Z = 2x + y\]

### Constraints:
1. Medicinal ingredient usage constraint: \[3x + 2y \leq 1000\]
2. Large pill production requirement: \[x \geq 100\]
3. Proportion constraint for small pills: \[y \geq 0.6(x + y)\]
4. Non-negativity constraint: \[x, y \geq 0\]

### Integer Constraints:
- \(x, y\) must be integers, as the number of pills cannot be fractional.

Using this model, we can apply linear programming techniques to find the optimal number of large and small pills to be made, minimizing the total number of filler material needed while satisfying the production requirements for the pills and the proportion constraint. This will provide the lab with an economically efficient pill production strategy.

## Python Code Solution Using `coptpy`:
Here is a Python script using the `coptpy` library to solve the problem:

\`\`\`python
import coptpy as cp
from coptpy import COPT

# Create a COPT environment
env = cp.Envr()

# Create the model
model = env.createModel("PillProduction")

# Add decision variables
x = model.addVar(vtype=COPT.INTEGER, name="x")  # Number of large pills
y = model.addVar(vtype=COPT.INTEGER, name="y")  # Number of small pills

# Objective function: Minimize the total number of filler material needed
model.setObjective(2 * x + y, sense=COPT.MINIMIZE)

# Constraints
model.addConstr(3 * x + 2 * y <= 1000, name="MaterialLimit")
model.addConstr(x >= 100, name="LargePillRequirement")
model.addConstr(y >= 0.6 * (x + y), name="SmallPillProportion")

# Solve the model
model.solve()

# Output results
if model.status == COPT.OPTIMAL:
    print("Minimum total number of filler material needed: {:.0f} units".format(model.objval))
    print("Number of large pills to be made: {:.0f}".format(x.x))
    print("Number of small pills to be made: {:.0f}".format(y.x))
else:
    print("No optimal solution found.")
\`\`\`

In this script, we first create a `COPT` environment and model. Then, we add two integer decision variables `x` and `y`, representing the number of large and small pills to be made, respectively.

Next, we set the objective function to minimize the total number of filler material needed, which is `2 * x + y`.

Then, we add three constraints:
1. Medicinal ingredient usage constraint: `3 * x + 2 * y <= 1000`
2. Large pill production requirement: `x >= 100`
3. Proportion constraint for small pills: `y >= 0.6 * (x + y)`

Finally, we solve the model and output the results of the optimal solution, including the minimum total number of filler material needed and the number of large and small pills to be made.

This script provides a complete example of using the `coptpy` library to solve the lab's pill production problem, while satisfying all the constraints mentioned in the problem.

Performances

Below is the comparison of performance on the NL4OPT, MAMO, and IndustryOR benchmarks. Values marked with a * are directly copied from original papers, with blanks where data were not reported. The highest results are highlighted in bold.

MethodNL4OPTMAMO EasyLPMAMO ComplexLPIndustryORMicro AvgMacro Avg
Methods based on PLMs
tag-BART47.9%*-----
Methods based on GPT-3.5
Standard42.4%*-----
Reflexion50.7%*-----
Chain-of-Experts58.9%*-----
Methods based on GPT-4
Standard47.3%*66.5%*14.6%*28.0%50.2%39.1%
Reflexion53.0%*-----
Chain-of-Experts64.2%*-----
OptiMUS78.8%*-----
ORLMs based on open-source LLMs
ORLM-Mistral-7B84.4%81.4%32.0%27.0%68.8%56.2%
ORLM-Deepseek-Math-7B-Base86.5%82.2%37.9%33.0%71.2%59.9%
ORLM-LLaMA-3-8B85.7%82.3%37.4%38.0%71.4%60.8%

Citation

@article{tang2024orlm,
  title={ORLM: A Customizable Framework in Training Large Models for Automated Optimization Modeling},
  author={Tang, Zhengyang and Huang, Chenyu and Zheng, Xin and Hu, Shixi and Wang, Zizhuo and Ge, Dongdong and Wang, Benyou},
  journal={arXiv preprint arXiv:2405.17743},
  year={2024}
}
@article{llama3modelcard,
  title={Llama 3 Model Card},
  author={AI@Meta},
  year={2024},
  url = {https://github.com/meta-llama/llama3/blob/main/MODEL_CARD.md}
}

License

The use of this model is governed by the META LLAMA 3 COMMUNITY LICENSE AGREEMENT.

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

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

GPU в ailist

llama.cpp

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

GGUF-модель ждёт проверки: нужно выбрать файл кванта под доступные GPU.

Ревизия весов
b74d354

0 моделей