alt.freeweights.text / OptiMind-RL
From: microsoft <huggingface.co/microsoft>Newsgroups: alt.freeweights.textSubject:

OptiMind-RL

Date: 2026-11-15Commit: 432b1f0Signed: 2DC28CC7B26A283B ✓

Reinforcement learning model with 20.9B parameters. Safetensors weights, 41.9 GB in all. Published by microsoft under MIT.

20.9B params41.9GBOptiMind-RLsafetensorspermissive
FactsParams20.9BSize41.9 GBFormatssafetensorsTaskreinforcement learningLicenseMITFrom sourcepermissive
$ fw get microsoft/OptiMind-RL
# manifest sha256 69a7b98b3b72… · 41.9 GB · 18 files
$ fw verify ./OptiMind-RL microsoft/OptiMind-RL
From sourceHosted (signed)microsoft/OptiMind-RLLast check: 2026-11-15 04:16 UTC

Get help: custom fine-tune or private deploy. We review your setup before we quote.

Fine-tune of gpt-oss-20b-BF16.

Works with

Runs with

Ranked by fit to this model (safetensors), then by GitHub stars.

Overview

Size
41.9 GB
Weights
41.8 GB (safetensors)
Parameters
20.9B
Formats
safetensors
Task
reinforcement learning
License
MIT (permissive)
Files
18, each with a sha256
Publisher
microsoft
Added
2026-11-15
Section
alt.freeweights.text
Lineage

Original release from the publisher.

Base model: unsloth/gpt-oss-20b-BF16

Where these bytes come from
Publisher at the pinned commit→You

Sources are tried in order. A file counts only when its size and sha256 match the manifest. Sources are checked when you ask for them, not on a timer.

Sources
BadgeHostLast checkResult
From sourcehuggingface.co2026-11-15 04:16 UTCpassed

Model card

From the publisher at commit 432b1f0. Shown as plain text with links; images open at the publisher.

Model Overview#

OptiMind-RL is a specialized 20B parameter model designed to bridge the gap between natural language and executable optimization solvers. It automates the translation of complex decision-making problems—such as supply chain planning, scheduling, and resource allocation—into correct MILP formulations. It is trained with multi-turn reinforcement learning using solver feedback and improves upon our previous model, OptiMind-SFT.

Model Summary#

Developer: Microsoft Research, Machine Learning and Optimization (MLO) Group \ Model Architecture: Mixture-of-Experts (MoE) variant of the transformer architecture (gpt-oss family). \ Parameters: 20 Billion (3.6B activated) \ Inputs: Natural language optimization problem description. \ Context Length: 128,000 tokens \ Outputs: Mathematical formulation and executable Python code using GurobiPy. \ GPUs: 16x NVIDIA B200 (RL Training), 8x NVIDIA H100 (Inference/Evaluation) \ Public Data Summary: Cleaned subsets of OR-Instruct and OptMATH-Train \ Status: Static model trained with multi-turn reinforcement learning on cleaned public datasets \ License: MIT \ Model Dependencies: openai/gpt-oss-20b \ Additional Assets: GitHub Repository

Usage#

Sample Useage#

OptiMind-RL is best served with SGLang. we use SGLang’s OpenAI-compatible API together with the official openai Python client:

pip install "sglang[all]" openai gurobipy

# Make sure you have a valid Gurobi license and PYTHON>=3.12
python -m sglang.launch_server \
  --model-path microsoft/optimind-rl \
  --host 0.0.0.0 \
  --port 30000 \
  --tensor-parallel-size 1 \
  --trust-remote-code

Below is the sample code to query the model:

from openai import OpenAI

# SGLang exposes an OpenAI-compatible endpoint
client = OpenAI(
    base_url="http://localhost:30000/v1",
    api_key="EMPTY"  # Not used by local SGLang, but required by the client
)

system_prompt = """You are an expert in optimization and mixed integer programming. You are given an
optimization problem and you need to solve it using gurobipy.
Reason step by step before generating the gurobipy code.
When you respond, first think carefully.
After thinking, output the math modeling of the problem.
Finally output a ```python ...``` code block that solves the problem.
The code must include:
import gurobipy as gp
from gurobipy import GRB
"""

user_problem = "A factory produces products A and B with capacity and demand constraints ..."

response = client.chat.completions.create(
    model="microsoft/optimind-rl",
    messages=[
        {"role": "system", "content": system_prompt},
        {"role": "user", "content": user_problem},
    ],
    temperature=0.9,   # recommended default
    top_p=1.0,         # recommended default
    max_tokens=4096,
)

print(response.choices[0].message.content)

This will return a response that first describes the mathematical model and then includes a python code block implementing it in gurobipy.

Primary Use Cases#

  • Translating natural-language Operations Research (OR) problems into mixed-integer linear programs (MILPs) and corresponding gurobipy code for research and prototyping.
  • Studying and benchmarking NL to MILP modeling pipelines on public OR datasets such as IndustryOR, Mamo-Complex, and OptMATH.
  • Educational use for teaching how to derive optimization models (variables, constraints, objectives) from informal problem descriptions.
  • Performing ablations and research on solver-in-the-loop prompting and multi-turn correction in domain-specific modeling tasks.

Out-of-Scope Use Cases#

  • General-purpose chat, open-domain reasoning, or tasks unrelated to optimization modeling.
  • Safety-critical or regulated applications (e.g., healthcare, finance, legal decisions, credit scoring) without expert human review of both the model output and the resulting optimization.
  • Fully automated deployment where optimization results are used directly for real-world decisions without human oversight.
  • Automatic execution of generated code in production systems without sandboxing, logging, and appropriate security controls.

Technical Requirements & Integration#

We recommend ≥32GB GPU VRAM (e.g., A100/H100/B200) for comfortable inference, especially for long prompts and multi-turn interactions. Please checkout our GitHub page for instructions on the inference pipeline.

Data Overview#

Training and Validation Data#

We train OptiMind-RL with multi-turn reinforcement learning on cleaned versions of the OR-Instruct and OptMATH training sets. RL starts directly from the base model, independently of OptiMind-SFT, and uses three-turn rollouts with solver feedback and average per-turn objective-matching correctness as the reward.

Testing Data#

For testing, we use manually cleaned and expert-validated versions of the IndustryOR, Mamo-Complex, and OptMATH benchmarks. Please visit our GitHub page to download the cleaned benchmarks.

Known Technical Limitations#

  • The model can still produce incorrect formulations or invalid code, or declare feasibility/optimality incorrectly.
  • It is specialized to OR benchmarks; behavior on general text or other problem domains is not guaranteed.
  • No dedicated red-teaming against unsafe content categories (e.g., hate, violence, self-harm) or jailbreak attacks has been performed; the paper focuses on technical robustness metrics.

Users must keep a human in the loop for all consequential decisions and carefully review any generated code before execution.

Other Sources & Maintenance#

For questions, issues, or feature requests, please use the GitHub issue tracker or the Hugging Face “Community” tab.

Citation#

If you use OptiMind-RL or the associated datasets/benchmarks in your work, please cite:

@inproceedings{zhang2026optimind,
  title={OptiMind: Improving Small Language Models for Optimization Modeling through Formulation Guidance and Multi-Turn Learning},
  author={Zhang, Xinzhi and Chen, Zeyi and Zope, Humishka and Barbalho, Hugo and Mellou, Konstantina and Molinaro, Marco and Kulkarni, Janardhan and Menache, Ishai and Li, Sirui},
  journal={The Fortieth Annual Conference on Neural Information Processing Systems},
  year={2026},
}

Files

18 files · 41.9 GBWeights 41.8 GB (safetensors). Sizes and sha256 from the signed manifest.
Hide all 18 files with their sha256
FileSizesha256
.gitattributes1.57 KB34448b82c17d60fec9b65b1f093c115ddbaadc04beb1b0140b6bfed2e012a930
README.md6.97 KB08b92b24e6069d226d04a256e0723de7bf563f0151986c2a990c1cbd17717ad0
chat_template.jinja16.7 KBa4c9919cbbd4acdd51ccffe22da049264b1b73e59055fa58811a99efbd7c8146
config.json1.62 KBb91dcd017f84c72952f8fee198ad80eae1d05d4113a31a8bc2500f22e21c3c56
generation_config.json177 Bf9970ada892d2d1f72e3ed0a6535ccebadd11897318794ca671d8c7014c957da
model-00000-of-00009.safetensors4.34 GBb1b2e29d2f2013cf4c4f7fbe6c04bf16ca63446f8f9450e43fb99b31a8aa1a06
model-00001-of-00009.safetensors5.31 GB551dc9d3242d98e4bbc6aefcc08adc26f711436645abe578d656dfae7e02b62c
model-00002-of-00009.safetensors5.31 GB93f651aaa469af9f94a6430e655dbb91df31b0a441d24834c0220b27dc1e2933
model-00003-of-00009.safetensors5.31 GB8252bde69acf2702d550b0282ec8f8d744b29ec25be3cf51dfcfaee24f7e303e
model-00004-of-00009.safetensors5.31 GBb800ec492f39a7997e00cdd0ccd50c3713c943ef33f6ba3e36d6b45011e6d55c
model-00005-of-00009.safetensors5.32 GB9f8f163382c73c028e8a6f64a66b6e41b8195e136e3da61af0877454aebeb080
model-00006-of-00009.safetensors5.31 GBc885295b1878fcb03aea95c610748c5529a0737a942bbc469b75c0400a8511aa
model-00007-of-00009.safetensors4.47 GB1c606e2b250892f425beedf737adcace23510570a30d7069b08b3616cafa45df
model-00008-of-00009.safetensors1.16 GB56bbac5749c20afdc1caa47aa7fa23657ed089d1cc35daac1a1f233f1c246ee6
model.safetensors.index.json33.6 KBc7d67fb71037e6477f056d0f3b46ea0f6330d3d608980cafdea55cc7ebc0371b
special_tokens_map.json98 Bdd5e191d20c12d2fee1da5bae14ca1db0f5f4215300af691f23cdee97120a293
tokenizer.json27.9 MB0614fe83cadab421296e664e1f48f4261fa8fef6e03e63bb75c20f38e37d07d3
tokenizer_config.json4.20 KB9279e942392b742d633c7adbb89ebe002c98399db8926a7af5125c726f404070
VersionsEach time the pinned upstream commit or file list changed in this repo. Newest first.
Upstream commitDateContents
432b1f0c49 pinned now2026-11-15 04:16 UTC18 files · 41.9 GB

Use it

$ fw get microsoft/OptiMind-RL
# manifest sha256 69a7b98b3b72… · 41.9 GB · 18 files
$ fw verify ./OptiMind-RL microsoft/OptiMind-RL
fw.pyChecks the signature and every sha256, tries each source in order, resumes.
$ python3 fw.py get https://freeweights.allternit.com/manifests/microsoft/OptiMind-RL.json --dir ./OptiMind-RL $ python3 fw.py verify ./OptiMind-RL ./microsoft__OptiMind-RL.json
hfThe Hugging Face CLI with one setting. Same repo id.
$ HF_ENDPOINT=https://freeweights.allternit.com hf download microsoft/OptiMind-RL --revision 432b1f0c4957f26f85818bb10aff26c15d08e94d --local-dir ./OptiMind-RL

License

Name
MIT License
Id
MIT
Class
Permissive
Redistribution
yes
Listing
Hosted (signed)
Decided
License as declared by the publisher. No person read it. 2026-11-15
Text in
README.md
Text sha256
08b92b24e6069d226d04a256e0723de7bf563f0151986c2a990c1cbd17717ad0
Terms gate
No extra terms beyond the license.

Read the license text

Licenses are checked against the license table. A custom license passes only after a person reads it.

Provenance

From: microsoft <huggingface.co/microsoft>Newsgroups: alt.freeweights.textSubject: OptiMind-RLDate: 2026-11-15Commit: 432b1f0Signed: 2DC28CC7B26A283B ✓
Upstream
microsoft/OptiMind-RL
Pinned commit
432b1f0c4957f26f85818bb10aff26c15d08e94d
Manifest
OptiMind-RL.json · .minisig
Manifest sha256
69a7b98b3b72f51a957be4a2aac9c8b7a0c686b0cb327746f1a908152eb523ac
Signature
minisign, Ed25519, key 2DC28CC7B26A283B
Created
2026-11-15 04:16 UTC
Generator
freeweights-manifest/0.1.0
Takedowns
None.

How to verify

$ curl -O https://freeweights.allternit.com/manifests/microsoft/OptiMind-RL.json $ curl -O https://freeweights.allternit.com/manifests/microsoft/OptiMind-RL.json.minisig $ minisign -Vm OptiMind-RL.json -P RWQ7KGqyx4zCLXtUFOqvfv8L3g+8fpKJ1FsuxPyOYMF+4KufbUxKq1Oq $ shasum -a 256 <file> # compare with the Files tab

A manifest whose signature fails must be rejected. A file whose size or sha256 does not match must be discarded. Verify a download

Model tree

Parent

unsloth/gpt-oss-20b-BF16 · this model is a finetune of it

No model in the catalog names this one as its parent.

Get it
Download
$ HF_ENDPOINT=https://freeweights.allternit.com hf download microsoft/OptiMind-RL
Open in Freeweights Studio

Pull, verify and run it in the Allternit app on Desktop, web or phone.

Signed manifest
minisign, key 2DC28CC7B26A283B. OptiMind-RL.json. Provenance. Takedown history: none.
From: laion <huggingface.co/laion>Subject: a2-rl-e2egit_large-50-32B
From: laion <huggingface.co/laion>Subject: a3-rl-DCAgent_exp_rpt_e2egit-large-15-8B
From: laion <huggingface.co/laion>Subject: a3-rl-DCAgent_exp_rpt_e2egit-v2-10-8B
From: laion <huggingface.co/laion>Subject: a3-rl-DCAgent_exp_rpt_pymethods2test-large-80-8B
From: laion <huggingface.co/laion>Subject: a3-rl-DCAgent_exp_rpt_unitsyn-python-large-10-8B
From: laion <huggingface.co/laion>Subject: a3-rl-DCAgent_mix_h2_language_proportional-65-8B