qwen2-math-1.5b

PyTorch

2 versions

Qwen2 Math is a series of specialized math language models built upon the Qwen2 LLMs, which significantly outperforms the mathematical capabilities of open-source models and even closed-source models (e.g., GPT4o).

Run this model

  1. Install our magic package manager:

    curl -ssL https://magic.modular.com/ | bash

    Then run the source command that's printed in your terminal.

  2. Install Max Pipelines in order to run this model.

    magic global install max-pipelines
  3. Start a local endpoint for qwen2-math/1.5b:

    max-serve serve --huggingface-repo-id Qwen/Qwen2-Math-1.5B-Instruct

    The endpoint is ready when you see the URI printed in your terminal:

    Uvicorn running on http://0.0.0.0:8000 (Press CTRL+C to quit)
  4. Now open another terminal to send a request using curl:

    curl -N http://0.0.0.0:8000/v1/chat/completions -H "Content-Type: application/json" -d '{
        "model": "qwen2-math/1.5b",
        "stream": true,
        "messages": [
            {"role": "system", "content": "You are a helpful assistant."},
            {"role": "user", "content": "Who won the World Series in 2020?"}
        ]
    }' | grep -o '"content":"[^"]*"' | sed 's/"content":"//g' | sed 's/"//g' | tr -d '
    ' | sed 's/\n/
    /g'
  5. 🎉 Hooray! You’re running Generative AI. Our goal is to make this as easy as possible.

About

Qwen2 Math introduces three model sizes: 1.5B, 7B, and 72B. Each size is available in two variants: a base model designed for tasks like completion, few-shot inference, and fine-tuning, and an instruct model optimized for conversational use.

These models represent advancements in mathematical reasoning and problem-solving capabilities within the generative AI space. Qwen2 Math demonstrates strong performance across a variety of domains, supporting diverse applications in academia, research, and beyond.

For further details, check out the Qwen 2 Math Blog Post, explore the GitHub Repository, or review contributions on Hugging Face.

DETAILS

MODEL CLASS
PyTorch

MODULAR GITHUB

Modular

CREATED BY

Qwen

MODEL

Qwen/Qwen2-Math-1.5B-Instruct

TAGS

arxiv:2407.10671
chat
conversational
en
license:apache-2.0
qwen2
region:us
safetensors
text-generation

@ Copyright - Modular Inc - 2024