Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use token ids in vllm #153

Merged
merged 30 commits into from
Jan 6, 2025
Merged

use token ids in vllm #153

merged 30 commits into from
Jan 6, 2025

Conversation

AlexPiche
Copy link
Collaborator

@AlexPiche AlexPiche commented Dec 21, 2024

Use the token_ids produce by vLLM

  • Simplify the Trainable class, e.g. no need to remove leading white space, etc.
  • Process the log probs and record the prodsuced token ids
  • Remove all the token verification from rl_orchestrator.py
  • Modify finetune/data.py to overwrite the huggingface generated input_ids and labels when these are provided in entry.

Replications

DeepSeek RFT

Before

Screenshot 2024-12-27 at 4 44 36 PM

After

Screenshot 2024-12-27 at 4 45 33 PM

Gemma2 2b RFT

train_mean_reward does not improve as much as before, but test_mean_reward behaves similarly.

Before

Screenshot 2024-12-27 at 4 47 32 PM

After

Screenshot 2024-12-27 at 4 50 07 PM

@AlexPiche AlexPiche changed the title [WIP] use token ids in vllm use token ids in vllm Dec 27, 2024
Copy link
Collaborator

@rizar rizar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

God stuff! LGTM! I'd try to simplify the code in finetune.data before the merge though. I feel like the way is written is a bit of a trap that can give us trouble later on.

examples/rl_gsm8k/orchestrate_rl.py Outdated Show resolved Hide resolved
tapeagents/finetune/data.py Show resolved Hide resolved
tapeagents/llms.py Show resolved Hide resolved
@AlexPiche AlexPiche merged commit 535afdd into main Jan 6, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants