GGUF
conversational
How to use from
llama.cpp
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh
# Start a local OpenAI-compatible server with a web UI:
llama serve -hf a-m-team/AM-Thinking-v1-gguf:
# Run inference directly in the terminal:
llama cli -hf a-m-team/AM-Thinking-v1-gguf:
Install from WinGet (Windows)
winget install llama.cpp
# Start a local OpenAI-compatible server with a web UI:
llama serve -hf a-m-team/AM-Thinking-v1-gguf:
# Run inference directly in the terminal:
llama cli -hf a-m-team/AM-Thinking-v1-gguf:
Build from source code
git clone https://github.com/ggml-org/llama.cpp.git
cd llama.cpp
cmake -B build
cmake --build build -j --target llama-app
# Start a local OpenAI-compatible server with a web UI:
./build/bin/llama serve -hf a-m-team/AM-Thinking-v1-gguf:
# Run inference directly in the terminal:
./build/bin/llama cli -hf a-m-team/AM-Thinking-v1-gguf:
Use Docker
docker model run hf.co/a-m-team/AM-Thinking-v1-gguf:
Quick Links

license: apache-2.0

AMโ€‘Thinkingโ€‘v1: Advancing the Frontier of Reasoning at 32B Scale

  • 2025-05-10 ยท a-mโ€‘team

๐Ÿค— Hugging Face   |    ๐Ÿ“‘ Paper    |    ๐Ÿ“‘ Blog   

๐Ÿชถ Quantized For Smaller Footprints

Here we provide different quantized versions for the AM-Thinking-v1 model. For use with llama.cpp and Ollama, with smaller memory consumption.

Note w.r.t. system prompt

This model is trained with explicit system prompt:

You are a helpful assistant. To answer the user's question, you first think about the reasoning process and then provide the user with the answer. The reasoning process and answer are enclosed within <think> </think> and <answer> </answer> tags, respectively, i.e., <think> reasoning process here </think> <answer> answer here </answer>.

When using the model, please use this system prompt, otherwise the model could have undefined behavior.

In the Ollama version the system prompt and chat template (we use vanilla Qwen2.5 chat template) is already integrated into the Modelfile so just use as is. For the llama.cpp version an explicit -sys shall be used to add system prompt.

Use with llama.cpp

Download one of the model files, e.g. AM-Thinking-v1.Q4_K_M.gguf, then use llama.cpp to chat or serve.

Make sure to use with explicit system prompt, for example:

llama-cli -m AM-Thinking-v1.Q4_K_M.gguf -cnv -sys "You are a helpful assistant. To answer the user's question, you first think about the reasoning process and then provide the user with the answer. The reasoning process and answer are enclosed within <think> </think> and <answer> </answer> tags, respectively, i.e., <think> reasoning process here </think> <answer> answer here </answer>."

Use with Ollama

The Q4_K_M version has already been uploaded to Ollama.

ollama pull a-m-team/AM-Thinking-v1:Q4_K_M

See https://github.com/ollama/ollama?tab=readme-ov-file#community-integrations for more integrations / clients.

Inference Speed

On a Apple Macbook Pro with M3-Max, using the AM-Thinking-v1.Q4_K_M.gguf version, we get a roughly 16 tokens/s output throughput for short prompts.

๐Ÿš€ Introduction

We release AM-Thinkingโ€‘v1, a 32B dense language model focused on enhancing reasoning capabilities. Built on Qwenโ€ฏ2.5โ€‘32Bโ€‘Base, AM-Thinkingโ€‘v1 shows strong performance on reasoning benchmarks, comparable to much larger MoE models like DeepSeekโ€‘R1, Qwen3โ€‘235Bโ€‘A22B, Seed1.5-Thinking, and larger dense model like Nemotron-Ultra-253B-v1.

benchmark

๐Ÿงฉ Why Another 32B Reasoning Model Matters?

Large Mixtureโ€‘ofโ€‘Experts (MoE) models such as DeepSeekโ€‘R1 or Qwen3โ€‘235Bโ€‘A22B dominate leaderboardsโ€”but they also demand clusters of highโ€‘end GPUs. Many teams just need the best dense model that fits on a single card. AMโ€‘Thinkingโ€‘v1 fills that gap while remaining fully based on open-source components:

  • Outperforms DeepSeekโ€‘R1 on AIMEโ€™24/โ€™25 & LiveCodeBench and approaches Qwen3โ€‘235Bโ€‘A22B despite being 1/7โ€‘th the parameter count.
  • Built on the publicly availableโ€ฏQwenโ€ฏ2.5โ€‘32Bโ€‘Base, as well as the RL training queries.
  • Shows that with a wellโ€‘designed postโ€‘training pipeline ( SFT + dualโ€‘stage RL ) you can squeeze flagshipโ€‘level reasoning out of a 32โ€ฏB dense model.
  • Deploys on one A100โ€‘80โ€ฏGB with deterministic latencyโ€”no MoE routing overhead.
AIME 2024 LiveCodeBench
AM-Thinking-v1 achieves strong reasoning performance with significantly fewer parameters.

๐Ÿ› ๏ธ Use Cases

1) Code Generation

PROMPT :
write a python script for a bouncing red ball within a triangle, make sure to handle collision detection properly. make the triangle slowly rotate. implement it in python. make sure ball stays within the triangle
Bouncing Red Ball

2) Logic

diamond

3) Writing

sushi

โšก Quick start

from transformers import AutoModelForCausalLM, AutoTokenizer

model_name = "a-m-team/AM-Thinking-v1"

tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(
    model_name,
    torch_dtype="auto",
    device_map="auto"
)

prompt = "How can I find inner peace?"
messages = [
    {"role": "user", "content": prompt}
]
text = tokenizer.apply_chat_template(
    messages,
    tokenize=False,
    add_generation_prompt=True
)
model_inputs = tokenizer([text], return_tensors="pt").to(model.device)

generated_ids = model.generate(
    **model_inputs,
    max_new_tokens=49152
)
output_ids = generated_ids[0][len(model_inputs.input_ids[0]):].tolist() 

response = tokenizer.decode(output_ids, skip_special_tokens=True)
think_content = response.split("<think>")[1].split("</think>")[0]
answer_content = response.split("<answer>")[1].split("</answer>")[0]

print (f"user prompt: {prompt}")
print (f"model thinking: {think_content}")
print (f"model answer: {answer_content}")

Note: We have included the system prompt in the tokenizer configuration, as it was used during both the SFT and RL stages. To ensure consistent output quality, we recommend including the same system prompt during actual usage; otherwise, the model's responses may be significantly affected.

๐Ÿ”ง Post-training pipeline

To achieve its strong reasoning ability, AMโ€‘Thinkingโ€‘v1 goes through a carefully designed post-training pipeline. Below we describe the key stages involved in turning a base model into a high-performing reasoner:

Stepโ€ฏ1 โ€“ Coldโ€‘start SFT. We begin with the open-sourced Qwenโ€ฏ2.5โ€‘32Bโ€‘Base and run a broad supervised fineโ€‘tune on a blended training dataset of math, code and openโ€‘domain chat. This endows the model with a "thinkโ€‘thenโ€‘answer" behavioural pattern and equips it with an initial capacity for reasoning.

Stepโ€ฏ2 โ€“ Passโ€‘rateโ€‘aware data curation. Before any RL, the SFT model is evaluated on every mathโ€‘ and codeโ€‘oriented training query. For each item we log a pass rate; only those with 0โ€ฏ<โ€ฏpassโ€‘rateโ€ฏ<โ€ฏ1 are kept. In effect we discard problems the model already masters and those it utterly fails, concentrating learning on genuinely informative cases.

Stepโ€ฏ3 โ€“ Reinforcement learning . We adopt a twoโ€‘stage GRPO scheme: Stageโ€ฏ1 trains only on math and code queries. Once it converges, stage 2 starts by removing every query the model answered 100% correctly in Stageโ€ฏ1 and adjusting key hyperโ€‘parameters such as maximum generation length and learning rate.

โš ๏ธ Limitations

While AMโ€‘Thinkingโ€‘v1 excels at pure language reasoning and openโ€‘domain chat, it has not yet been trained for structured functionโ€‘calling or toolโ€‘use workflows, which restricts its usefulness in agentโ€‘style applications that must act on external systems. Improving the model's ability to follow complex instructions is also an important direction for our future work. In addition, our safety alignment is still at an early stage, so more rigorous redโ€‘teaming are required to reduce potential harms.

๐Ÿ“š Citation

If you find our work helpful, feel free to give us a cite.

@misc{ji2025amthinkingv1advancingfrontierreasoning,
      title={AM-Thinking-v1: Advancing the Frontier of Reasoning at 32B Scale}, 
      author={Yunjie Ji and Xiaoyu Tian and Sitong Zhao and Haotian Wang and Shuaiting Chen and Yiping Peng and Han Zhao and Xiangang Li},
      year={2025},
      eprint={2505.08311},
      archivePrefix={arXiv},
      primaryClass={cs.CL},
      url={https://arxiv.org/abs/2505.08311}, 
}
Downloads last month
440
GGUF
Model size
33B params
Architecture
qwen2
Hardware compatibility
Log In to add your hardware

2-bit

3-bit

4-bit

5-bit

6-bit

8-bit

Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for a-m-team/AM-Thinking-v1-gguf

Quantized
(12)
this model

Collection including a-m-team/AM-Thinking-v1-gguf

Paper for a-m-team/AM-Thinking-v1-gguf