Dataset Viewer
Auto-converted to Parquet Duplicate
Search is not available for this dataset
image
image

RLHF + RLCD Rotation

First to combine RLHF + RLCD in rotation!

Idea

RLHF alone is expensive. RLCD alone is not enough.

My idea: Rotate them!

RLHF -> RLCD -> RLHF -> RLCD

How it works

  1. RLHF Step: Learn from human taste, human preference.
  2. RLCD Step: Learn from contrastive distillation, positive vs negative prompt.
  3. DEAD_ZONE = 0.05: If the difference between RLHF and RLCD is small, keep both ON. Don't switch. This prevents mode collapse.
  4. Repeat: 14000 steps.

Note about Code Image

The image shared is only a part of the code.

Code Part

Why it works

  • RLHF gives human intelligence.
  • RLCD gives contrastive diversity.
  • Rotation prevents repetition.
  • DEAD_ZONE prevents collapse.

RLHF + RLCD = 0.7, 0.8, 0.9. Real thinking.

Results

  • No mode collapse.
  • No repetition.
  • Model stays smart, not dumber.

Training

This training is not finished yet. It needs more resources to reach the target.

Setup

  • Base Model: 100M
  • Method: RLHF + RLCD Rotation
  • LoRA: Yes, optimized LoRA
  • dtype: float32
  • Optimizer: AdamW (lr=2e-4)

Why it needs more resources?

With LoRA + float32, training is heavier.

  • float32 keeps weights precise, no loss.
  • LoRA needs optimization.
  • group_params is used for the adapter only, for optimization, nothing else.

This costs more RAM / VRAM, but it is necessary to get the correct result.

group_params

I made an improvement for LoRA:

  • group_params is only for the adapter.
  • Only adapter weights are optimized.
  • Base model is frozen.
  • No conflict at all.

Checked

  • Full code checked.
  • Adapter checked.
  • Weights checked.
  • No conflict at all!

What is needed?

To finish training and get the required result, we need more resources:

  • More VRAM / RAM
  • Clean run, no interruption

Status

Code is clean. Code is complete. Code is checked. Training is waiting for resources.

Code

No code shared. Idea only.

Author

Mouad Tarif

Downloads last month
-