PKU-Alignment / beaver-7b-v3.0-reward

huggingface.co
Total runs: 33
24-hour runs: 0
7-day runs: 8
30-day runs: 4
Model's Last Updated: April 21 2024
reinforcement-learning

Introduction of beaver-7b-v3.0-reward

Model Details of beaver-7b-v3.0-reward

🦫 Beaver's Reward Model

Model Details

The Beaver reward model is a preference model trained using the PKU-SafeRLHF dataset. It can play a role in the safe RLHF algorithm, helping the Beaver model become more helpful.

  • Developed by: the PKU-Alignment Team.
  • Model Type: An auto-regressive language model based on the transformer architecture.
  • License: Non-commercial license.
  • Fine-tuned from model: LLaMA , Alpaca .
Model Sources
How to Use the Reward Model
import torch
from transformers import AutoTokenizer
from safe_rlhf.models import AutoModelForScore

model = AutoModelForScore.from_pretrained('PKU-Alignment/beaver-7b-v3.0-reward', torch_dtype=torch.bfloat16, device_map='auto')
tokenizer = AutoTokenizer.from_pretrained('PKU-Alignment/beaver-7b-v3.0-reward')

input = 'BEGINNING OF CONVERSATION: USER: hello ASSISTANT:Hello! How can I help you today?'

input_ids = tokenizer(input, return_tensors='pt')
output = model(**input_ids)
print(output)

# ScoreModelOutput(
#     scores=tensor([[[-14.0000],
#          [ -2.6094],
#          [ -2.6562],
#          [ -2.0312],
#          [ -1.2188],
#          [ -1.6250],
#          [ -2.4688],
#          [ -2.7500],
#          [ -3.0000],
#          [ -6.0000],
#          [ -5.0625],
#          [ -7.0938],
#          [ -6.9688],
#          [ -4.3125],
#          [ -4.2188],
#          [ -3.7969],
#          [ -3.6875],
#          [ -3.3750],
#          [ -2.8906],
#          [ -3.9219],
#          [ -2.1406],
#          [ -1.7578],
#          [  0.4629],
#          [  2.1719],
#          [  4.4062],
#          [  7.1562],
#          [  7.7188],
#          [ 10.7500]]], grad_fn=<ToCopyBackward0>),
#     end_scores=tensor([[10.7500]], grad_fn=<ToCopyBackward0>),
#     last_hidden_state=tensor([[[ 0.4805, -0.4863, -0.9258,  ..., -0.0718,  0.8555,  0.6641],
#          [ 0.2021,  2.0156,  3.5156,  ..., -0.9844, -1.1484,  1.3203],
#          [ 1.0938,  1.4609,  1.7891,  ..., -3.2031, -0.8555, -1.2969],
#          ...,
#          [ 1.5859,  0.1348,  0.0322,  ..., -1.3672, -1.5234,  1.5156],
#          [ 0.9102,  0.6367, -0.8555,  ..., -1.2109, -0.6953,  1.5312],
#          [ 1.7188,  0.4434, -0.5586,  ..., -1.1484, -0.7461,  2.2031]]],
#        dtype=torch.bfloat16, grad_fn=<ToCopyBackward0>),
#     end_last_hidden_state=tensor([[ 1.7188,  0.4434, -0.5586,  ..., -1.1484, -0.7461,  2.2031]],
#        dtype=torch.bfloat16, grad_fn=<ToCopyBackward0>),
#     end_index=tensor([27])
# )

Runs of PKU-Alignment beaver-7b-v3.0-reward on huggingface.co

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

More Information About beaver-7b-v3.0-reward huggingface.co Model

beaver-7b-v3.0-reward huggingface.co

beaver-7b-v3.0-reward huggingface.co is an AI model on huggingface.co that provides beaver-7b-v3.0-reward's model effect (), which can be used instantly with this PKU-Alignment beaver-7b-v3.0-reward model. huggingface.co supports a free trial of the beaver-7b-v3.0-reward model, and also provides paid use of the beaver-7b-v3.0-reward. Support call beaver-7b-v3.0-reward model through api, including Node.js, Python, http.

beaver-7b-v3.0-reward huggingface.co Url

https://huggingface.co/PKU-Alignment/beaver-7b-v3.0-reward

PKU-Alignment beaver-7b-v3.0-reward online free

beaver-7b-v3.0-reward huggingface.co is an online trial and call api platform, which integrates beaver-7b-v3.0-reward's modeling effects, including api services, and provides a free online trial of beaver-7b-v3.0-reward, you can try beaver-7b-v3.0-reward online for free by clicking the link below.

PKU-Alignment beaver-7b-v3.0-reward online free url in huggingface.co:

https://huggingface.co/PKU-Alignment/beaver-7b-v3.0-reward

beaver-7b-v3.0-reward install

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

beaver-7b-v3.0-reward install url in huggingface.co:

https://huggingface.co/PKU-Alignment/beaver-7b-v3.0-reward

Url of beaver-7b-v3.0-reward

beaver-7b-v3.0-reward huggingface.co Url

Provider of beaver-7b-v3.0-reward huggingface.co

PKU-Alignment
ORGANIZATIONS

Other API from PKU-Alignment