TIGER-Lab / AceCodeRM-32B

huggingface.co
Total runs: 18
24-hour runs: 0
7-day runs: 2
30-day runs: 8
Model's Last Updated: April 09 2025

Introduction of AceCodeRM-32B

Model Details of AceCodeRM-32B

🂡 AceCoder

Paper | Github | AceCode-89K | AceCodePair-300K | RM/RL Models

We introduce AceCoder, the first work to propose a fully automated pipeline for synthesizing large-scale reliable tests used for the reward model training and reinforcement learning in the coding scenario. To do this, we curated the dataset AceCode-89K, where we start from a seed code dataset and prompt powerful LLMs to "imagine" proper test cases for the coding question and filter the noisy ones. We sample inferences from existing coder models and compute their pass rate as the reliable and verifiable rewards for both training the reward model and conducting the reinforcement learning for coder LLM.

This model is the official AceCodeRM-32B trained from Qwen2.5-Coder-32B-Instruct on TIGER-Lab/AceCodePair-300K

https://tiger-ai-lab.github.io/AceCoder/static/images/ac_overview.png

Performance on Best-of-N sampling

https://tiger-ai-lab.github.io/AceCoder/static/images/ac_table2.png

Usage
  • To use the RM to produce rewards, please apply the following example codes:
import torch
import torch.nn as nn
from transformers import Qwen2ForCausalLM, AutoTokenizer
class ValueHead(nn.Module):
    r"""
    The ValueHead class implements a head for GPT2 that returns a scalar for each output token.
    """

    def __init__(self, config, **kwargs):
        super().__init__()
        if not hasattr(config, "summary_dropout_prob"):
            summary_dropout_prob = kwargs.pop("summary_dropout_prob", 0.1)
        else:
            summary_dropout_prob = config.summary_dropout_prob

        self.dropout = (
            nn.Dropout(summary_dropout_prob) if summary_dropout_prob else nn.Identity()
        )

        # some models such as OPT have a projection layer before the word embeddings - e.g. OPT-350m
        if hasattr(config, "hidden_size"):
            hidden_size = config.hidden_size
        if hasattr(config, "word_embed_proj_dim"):
            hidden_size = config.word_embed_proj_dim
        elif hasattr(config, "is_encoder_decoder"):
            if config.is_encoder_decoder and hasattr(config, "decoder"):
                if hasattr(config.decoder, "hidden_size"):
                    hidden_size = config.decoder.hidden_size

        self.summary = nn.Linear(hidden_size, 1)

        self.flatten = nn.Flatten()

    def forward(self, hidden_states):
        output = self.dropout(hidden_states)

        # For now force upcast in fp32 if needed. Let's keep the
        # output in fp32 for numerical stability.
        if output.dtype != self.summary.weight.dtype:
            output = output.to(self.summary.weight.dtype)

        output = self.summary(output)
        return output


class Qwen2ForCausalRM(Qwen2ForCausalLM):
    def __init__(self, config):
        super().__init__(config)
        self.v_head = ValueHead(config)

    def forward(
        self,
        input_ids=None,
        past_key_values=None,
        attention_mask=None,
        return_past_key_values=False,
        **kwargs,
    ):
        r"""
        Applies a forward pass to the wrapped model and returns the logits of the value head.

        Args:
            input_ids (`torch.LongTensor` of shape `(batch_size, sequence_length)`):
                Indices of input sequence tokens in the vocabulary.
            past_key_values (`tuple(tuple(torch.FloatTensor))`, `optional`):
                Contains pre-computed hidden-states (key and values in the attention blocks) as computed by the model
                (see `past_key_values` input) to speed up sequential decoding.
            attention_mask (`torch.FloatTensor` of shape `(batch_size, sequence_length)`, `optional`):
                Mask to avoid performing attention on padding token indices. Mask values selected in ``[0, 1]``:
                - 1 for tokens that are **not masked**,
                - 0 for tokens that are **masked**.
            return_past_key_values (bool): A flag indicating if the computed hidden-states should be returned.
            kwargs (`dict`, `optional`):
                Additional keyword arguments, that are passed to the wrapped model.
        """
        kwargs["output_hidden_states"] = (
            True  # this had already been set in the LORA / PEFT examples
        )
        kwargs["past_key_values"] = past_key_values

        # if (
        #     self.is_peft_model
        #     and
        #     self.pretrained_model.active_peft_config.peft_type == "PREFIX_TUNING"
        # ):
        #     kwargs.pop("past_key_values")

        base_model_output = super().forward(
            input_ids=input_ids,
            attention_mask=attention_mask,
            **kwargs,
        )

        last_hidden_state = base_model_output.hidden_states[-1]
        lm_logits = base_model_output.logits
        loss = base_model_output.loss

        if last_hidden_state.device != self.v_head.summary.weight.device:
            last_hidden_state = last_hidden_state.to(self.v_head.summary.weight.device)

        value = self.v_head(last_hidden_state).squeeze(-1)

        # force upcast in fp32 if logits are in half-precision
        if lm_logits.dtype != torch.float32:
            lm_logits = lm_logits.float()

        if return_past_key_values:
            return (lm_logits, loss, value, base_model_output.past_key_values)
        else:
            return (lm_logits, loss, value)

model_path = "TIGER-Lab/AceCodeRM-32B"
model = Qwen2ForCausalRM.from_pretrained(model_path, device_map="auto")
tokenizer = AutoTokenizer.from_pretrained(model_path, trust_remote_code=True)
input_chat = [
                {"role": "user", "content": "Hello, how are you?"},
                {
                    "role": "assistant",
                    "content": "I'm doing great. How can I help you today?",
                },
                {
                    "role": "user",
                    "content": "I'd like to show off how chat templating works!",
                },
            ]
input_tokens = tokenizer.apply_chat_template(
        input_chat,
        tokenize=True,
        return_dict=True,
        padding=True,
        return_tensors="pt",
    ).to(model.device)
_, _, values = model(
    **input_tokens,
    output_hidden_states=True,
    return_dict=True,
    use_cache=False,
)
masks = input_tokens["attention_mask"]
chosen_scores = values.gather(
    dim=-1, index=(masks.sum(dim=-1, keepdim=True) - 1)
) # find the last token (eos) in each sequence, a
chosen_scores = chosen_scores.squeeze()
print(chosen_scores)
  • To use the RM for the RL tuning, please refer to our Github Code for more details
Citation
@article{AceCoder,
    title={AceCoder: Acing Coder RL via Automated Test-Case Synthesis},
    author={Zeng, Huaye and Jiang, Dongfu and Wang, Haozhe and Nie, Ping and Chen, Xiaotong and Chen, Wenhu},
    journal={ArXiv},
    year={2025},
    volume={abs/2207.01780}
}

Runs of TIGER-Lab AceCodeRM-32B on huggingface.co

18
Total runs
0
24-hour runs
2
3-day runs
2
7-day runs
8
30-day runs

More Information About AceCodeRM-32B huggingface.co Model

More AceCodeRM-32B license Visit here:

https://choosealicense.com/licenses/mit

AceCodeRM-32B huggingface.co

AceCodeRM-32B huggingface.co is an AI model on huggingface.co that provides AceCodeRM-32B's model effect (), which can be used instantly with this TIGER-Lab AceCodeRM-32B model. huggingface.co supports a free trial of the AceCodeRM-32B model, and also provides paid use of the AceCodeRM-32B. Support call AceCodeRM-32B model through api, including Node.js, Python, http.

AceCodeRM-32B huggingface.co Url

https://huggingface.co/TIGER-Lab/AceCodeRM-32B

TIGER-Lab AceCodeRM-32B online free

AceCodeRM-32B huggingface.co is an online trial and call api platform, which integrates AceCodeRM-32B's modeling effects, including api services, and provides a free online trial of AceCodeRM-32B, you can try AceCodeRM-32B online for free by clicking the link below.

TIGER-Lab AceCodeRM-32B online free url in huggingface.co:

https://huggingface.co/TIGER-Lab/AceCodeRM-32B

AceCodeRM-32B install

AceCodeRM-32B is an open source model from GitHub that offers a free installation service, and any user can find AceCodeRM-32B on GitHub to install. At the same time, huggingface.co provides the effect of AceCodeRM-32B install, users can directly use AceCodeRM-32B installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

AceCodeRM-32B install url in huggingface.co:

https://huggingface.co/TIGER-Lab/AceCodeRM-32B

Url of AceCodeRM-32B

AceCodeRM-32B huggingface.co Url

Provider of AceCodeRM-32B huggingface.co

TIGER-Lab
ORGANIZATIONS

Other API from TIGER-Lab

huggingface.co

Total runs: 2.9K
Run Growth: 2.5K
Growth Rate: 86.16%
Updated:October 14 2025
huggingface.co

Total runs: 925
Run Growth: 320
Growth Rate: 34.59%
Updated:December 06 2023
huggingface.co

Total runs: 877
Run Growth: 323
Growth Rate: 36.83%
Updated:December 06 2023
huggingface.co

Total runs: 520
Run Growth: 462
Growth Rate: 88.85%
Updated:January 09 2025
huggingface.co

Total runs: 223
Run Growth: -300
Growth Rate: -134.53%
Updated:July 15 2026
huggingface.co

Total runs: 197
Run Growth: -365
Growth Rate: -185.28%
Updated:July 15 2026
huggingface.co

Total runs: 173
Run Growth: -330
Growth Rate: -190.75%
Updated:July 15 2026
huggingface.co

Total runs: 144
Run Growth: -390
Growth Rate: -270.83%
Updated:July 15 2026
huggingface.co

Total runs: 114
Run Growth: -452
Growth Rate: -396.49%
Updated:July 15 2026
huggingface.co

Total runs: 19
Run Growth: -14
Growth Rate: -73.68%
Updated:November 08 2024