MA-RLHF is a novel framework that integrates macro actions into conventional RLHF. The macro actions are sequences of tokens or higher-level language constructs, with can be computed through different defined termination conditions, like n-gram based, perplexity-based, or parsing-based termination conditions. By introducing macro actions into RLHF, we reduce the number of decision points and shorten decision trajectories, alleviating the credit assignment problem caused by long temporal distances.
from transformers import AutoModelForCausalLM, AutoTokenizer
model_path = "baidu/TLDR-Gemma-7B-MA-PPO-Fixed5"
tokenizer = AutoTokenizer.from_pretrained(model_path, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(model_path, device_map="auto", torch_dtype='auto', trust_remote_code=True)
input_text = """POST Subreddit: r/catsHello everyone! One of my cats is about 10 years old now, she is pretty much strictlyindoors save for some time she spends on our screened in porch each day. (She likesto watch the birds in the yard while she suns herself by the pool, quite the princess).Anyway, when she was younger she was very active and quite small, however withage she has put on a pretty hefty amount of weight. I feed her indoor cat foodfor weight control, I’ve switched brands a few times trying to find something thatworks, I’ve cut back on feeding her by a lot (she gets very angry and demandingwhen she wants food but I don’t give in) however, nothing really seems to work.I’ve tried cat toys, and bought a harness thinking I could try to walk her but she justlays down and looks at me like I’m stupid. Basically I just want to know if you allhave any suggestions for exercise or food. I care about her and don’t want this toget any worse. I also have another cat that eats the same amount and type of foodas her and is a completely normal weight and only a year younger, however he is amale, not sure if that makes a difference in predisposition for weight gain. They arealso both fixed. TL;DR: """
input_ids = tokenizer(input_text, return_tensors='pt').to(model.device)
output_ids = model.generate(**input_ids, max_new_tokens=20)
response = tokenizer.decode(output_ids[0], skip_special_tokens=True)
print(response)
Citation
@inproceedings{
chai2025marlhf,
title={{MA}-{RLHF}: Reinforcement Learning from Human Feedback with Macro Actions},
author={Yekun Chai and Haoran Sun and Huang Fang and Shuohuan Wang and Yu Sun and Hua Wu},
booktitle={The Thirteenth International Conference on Learning Representations},
year={2025},
url={https://openreview.net/forum?id=WWXjMYZxfH}
}
Runs of baidu TLDR-Gemma-7B-MA-PPO-Fixed5 on huggingface.co
1
Total runs
0
24-hour runs
0
3-day runs
0
7-day runs
0
30-day runs
More Information About TLDR-Gemma-7B-MA-PPO-Fixed5 huggingface.co Model
More TLDR-Gemma-7B-MA-PPO-Fixed5 license Visit here:
TLDR-Gemma-7B-MA-PPO-Fixed5 huggingface.co is an AI model on huggingface.co that provides TLDR-Gemma-7B-MA-PPO-Fixed5's model effect (), which can be used instantly with this baidu TLDR-Gemma-7B-MA-PPO-Fixed5 model. huggingface.co supports a free trial of the TLDR-Gemma-7B-MA-PPO-Fixed5 model, and also provides paid use of the TLDR-Gemma-7B-MA-PPO-Fixed5. Support call TLDR-Gemma-7B-MA-PPO-Fixed5 model through api, including Node.js, Python, http.
TLDR-Gemma-7B-MA-PPO-Fixed5 huggingface.co is an online trial and call api platform, which integrates TLDR-Gemma-7B-MA-PPO-Fixed5's modeling effects, including api services, and provides a free online trial of TLDR-Gemma-7B-MA-PPO-Fixed5, you can try TLDR-Gemma-7B-MA-PPO-Fixed5 online for free by clicking the link below.
baidu TLDR-Gemma-7B-MA-PPO-Fixed5 online free url in huggingface.co:
TLDR-Gemma-7B-MA-PPO-Fixed5 is an open source model from GitHub that offers a free installation service, and any user can find TLDR-Gemma-7B-MA-PPO-Fixed5 on GitHub to install. At the same time, huggingface.co provides the effect of TLDR-Gemma-7B-MA-PPO-Fixed5 install, users can directly use TLDR-Gemma-7B-MA-PPO-Fixed5 installed effect in huggingface.co for debugging and trial. It also supports api for free installation.
TLDR-Gemma-7B-MA-PPO-Fixed5 install url in huggingface.co: