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

huggingface.co
Total runs: 4.8K
24-hour runs: -19
7-day runs: -1.0K
30-day runs: 2.0K
Model's Last Updated: April 21 2024
reinforcement-learning

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

Model Details of beaver-7b-v1.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-v1.0-reward', torch_dtype=torch.bfloat16, device_map='auto')
tokenizer = AutoTokenizer.from_pretrained('PKU-Alignment/beaver-7b-v1.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([[[-19.7500],
#          [-19.3750],
#          [-20.1250],
#          [-18.0000],
#          [-20.0000],
#          [-23.8750],
#          [-23.5000],
#          [-22.0000],
#          [-21.0000],
#          [-20.1250],
#          [-23.7500],
#          [-21.6250],
#          [-21.7500],
#          [-12.9375],
#          [ -6.4375],
#          [ -8.1250],
#          [ -7.3438],
#          [ -9.1875],
#          [-13.6250],
#          [-10.5625],
#          [ -9.9375],
#          [ -6.4375],
#          [ -6.0938],
#          [ -5.8438],
#          [ -6.6562],
#          [ -5.9688],
#          [ -9.1875],
#          [-11.4375]]], grad_fn=<ToCopyBackward0>),
#     end_scores=tensor([[-11.4375]], grad_fn=<ToCopyBackward0>),
#     last_hidden_state=tensor([[[ 0.7461, -0.6055, -0.4980,  ...,  0.1670,  0.7812, -0.3242],
#          [ 0.7383, -0.5391, -0.1836,  ..., -0.1396,  0.5273, -0.2256],
#          [ 0.6836, -0.7031, -0.3730,  ...,  0.2100,  0.5000, -0.6328],
#          ...,
#          [-1.7969,  1.0234,  1.0234,  ..., -0.8047,  0.2500, -0.8398],
#          [ 2.0469, -1.3203,  0.8984,  ..., -0.7734, -1.4141, -1.6797],
#          [ 4.3438, -0.6953,  0.9648,  ..., -0.1787,  0.6680, -3.0000]]],
#        dtype=torch.bfloat16, grad_fn=<ToCopyBackward0>),
#     end_last_hidden_state=tensor([[ 4.3438, -0.6953,  0.9648,  ..., -0.1787,  0.6680, -3.0000]],
#        dtype=torch.bfloat16, grad_fn=<ToCopyBackward0>),
#     end_index=tensor([27])
# )

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

4.8K
Total runs
-19
24-hour runs
-1.2K
3-day runs
-1.0K
7-day runs
2.0K
30-day runs

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

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

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

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

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

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

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

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

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

beaver-7b-v1.0-reward install

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

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

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

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

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

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

PKU-Alignment
ORGANIZATIONS

Other API from PKU-Alignment