Model Card for Model ID

model_path_or_id = "Realmbird/rlhf-helpful-qwen-0.6b-PPO-tuned-generator" model = AutoModelForCausalLM.from_pretrained( model_path_or_id, device_map="auto", torch_dtype=torch.float16, # Assuming you trained with float16 or bfloat16 trust_remote_code=True # Qwen models often require this ) generator = pipeline( "text-generation", model=model, tokenizer=tokenizer, # device=0 if torch.cuda.is_available() else -1, # 0 for GPU, -1 for CPU torch_dtype=torch.float16 # Match the model's dtype )

Model Details

Model Description

This is the model card of a 馃 transformers model that has been pushed on the Hub. This model card has been automatically generated.

  • Developed by: [More Information Needed]
  • Funded by [optional]: [More Information Needed]
  • Shared by [optional]: [More Information Needed]
  • Model type: [More Information Needed]
  • Language(s) (NLP): [More Information Needed]
  • License: [More Information Needed]
  • Finetuned from model [optional]: [More Information Needed]

Model Sources [optional]

  • Repository: [More Information Needed]
  • Paper [optional]: [More Information Needed]
  • Demo [optional]: [More Information Needed]

Uses

Direct Use

[More Information Needed]

Downstream Use [optional]

[More Information Needed]

Out-of-Scope Use

[More Information Needed]

Bias, Risks, and Limitations

[More Information Needed]

Recommendations

Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.

How to Get Started with the Model

Use the code below to get started with the model.

from transformers import AutoTokenizer, AutoModelForCausalLM, pipeline
import torch

model_id = "Realmbird/rlhf-helpful-qwen-0.6b-PPO-tuned-generator"

tokenizer = AutoTokenizer.from_pretrained(model_id)
if tokenizer.pad_token is None:
    tokenizer.add_special_tokens({'pad_token': tokenizer.eos_token})

model = AutoModelForCausalLM.from_pretrained(
    model_id,
    device_map="auto",
    torch_dtype=torch.float16, # or torch.bfloat16 if your GPU supports it and you trained with it
    trust_remote_code=True
)
if model.config.pad_token_id is None:
    model.config.pad_token_id = tokenizer.pad_token_id

generator = pipeline(
    "text-generation",
    model=model,
    tokenizer=tokenizer,
    torch_dtype=torch.float16 # Match the model's dtype
)

prompt = "Human: Tell me about the benefits of a healthy diet.\n\nAssistant:"

generation_params = {
    "max_new_tokens": 200,
    "do_sample": True,
    "temperature": 0.7,
    "top_p": 0.9,
    "top_k": 50,
    "repetition_penalty": 1.1,
    "num_return_sequences": 1,
    "eos_token_id": tokenizer.eos_token_id,
    "pad_token_id": tokenizer.pad_token_id
}

generated_output = generator(prompt, **generation_params)
full_text = generated_output[0]['generated_text']

# Extract only the assistant's response
response_start_index = full_text.find("Assistant:")
if response_start_index != -1:
    assistant_response = full_text[response_start_index + len("Assistant:"):].strip()
else:
    assistant_response = full_text # Fallback

print(assistant_response)

[More Information Needed]

Training Details

Dataset

The model was fine-tuned on the "helpful-base" subset of the Anthropic/hh-rlhf dataset. This dataset contains human preference data (chosen/rejected pairs) used to train a reward model, which then guided the PPO training of this generative model.

Reward Model

A custom reward model, Realmbird/helpfulness-preference-model-qwen-0.6B-v2, was used to provide the reward signal during PPO training. This reward model was itself trained on human preference data to predict helpfulness scores.

Training Procedure

Used the reward model Realmbird/helpfulness-preference-model-qwen-0.6B-merged and with PPO with TRL

Preprocessing [optional]

[More Information Needed]

Training Hyperparameters

  • PPO Configuration:
    • learning_rate: 1.41e-5
    • num_train_epochs: 1
    • batch_size: 4
    • mini_batch_size: 1
    • gradient_accumulation_steps: 32
    • report_to: "none"
    • output_dir: ./rlhf_helpful_Qwen3_0.6B
  • LoRA Configuration (Policy Model):
    • task_type: CAUSAL_LM
    • r: 8
    • lora_alpha: 32
    • lora_dropout: 0.1
  • LoRA Configuration (Value Model):
    • task_type: SEQ_CLS
    • r: 8
    • lora_alpha: 32
    • lora_dropout: 0.1
  • Training regime: [More Information Needed]

Speeds, Sizes, Times [optional]

[More Information Needed]

Evaluation

Testing Data, Factors & Metrics

Testing Data

[More Information Needed]

Factors

[More Information Needed]

Metrics

[More Information Needed]

Results

[More Information Needed]

Summary

Model Examination [optional]

[More Information Needed]

Environmental Impact

Carbon emissions can be estimated using the Machine Learning Impact calculator presented in Lacoste et al. (2019).

  • Hardware Type: [More Information Needed]
  • Hours used: [More Information Needed]
  • Cloud Provider: [More Information Needed]
  • Compute Region: [More Information Needed]
  • Carbon Emitted: [More Information Needed]

Technical Specifications [optional]

Model Architecture and Objective

[More Information Needed]

Compute Infrastructure

[More Information Needed]

Hardware

[More Information Needed]

Software

[More Information Needed]

Citation [optional]

BibTeX:

[More Information Needed]

APA:

[More Information Needed]

Glossary [optional]

[More Information Needed]

More Information [optional]

[More Information Needed]

Model Card Authors [optional]

[More Information Needed]

Model Card Contact

[More Information Needed]

Downloads last month
17
Safetensors
Model size
0.4B params
Tensor type
F32
F16
U8
Inference Providers NEW
This model isn't deployed by any Inference Provider. 馃檵 Ask for provider support