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

feature(wqj): add vllm_test.py in ding/worker #853

Open
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

wqj2004
Copy link

@wqj2004 wqj2004 commented Jan 16, 2025

Overview

The whole RLHF training pipeline

tprl

Goal

In this PR, we need to finish the collector part in the above figure and add its unittest.

TODO

  • add vllm inferencer for LLM/VLM
  • scale up vllm inferencer in multi-GPUs
  • add several datasets definition @PaParaZz1
  • survey proper VQA dataset for RLHF training
  • add the final collector and test it on the above dataset
  • add tutorial and API doc
  • (optional) add search tools @PaParaZz1

@wqj2004 wqj2004 changed the title vllm_test.py in ding/worker add vllm_test.py in ding/worker(wqj) Jan 17, 2025
@wqj2004 wqj2004 changed the title add vllm_test.py in ding/worker(wqj) feature(wqj):add vllm_test.py in ding/worker Jan 17, 2025
@PaParaZz1 PaParaZz1 added the enhancement New feature or request label Jan 19, 2025
@PaParaZz1 PaParaZz1 changed the title feature(wqj):add vllm_test.py in ding/worker feature(wqj): add vllm_test.py in ding/worker Jan 19, 2025
ding/worker/vllm_test_wqj.py Outdated Show resolved Hide resolved

model=HuggingFaceModelGenerator('/mnt/afs/share/Qwen2-VL-7B',temperature=0.5) #设置一个temperature就好了,可以做到生成多个候选答案

def get_prompts_qwen(questions: list,modality: str):
Copy link
Member

Choose a reason for hiding this comment

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

polish code style

stop_token_ids = None
return prompts,stop_token_ids

def get_multi_modal_input(modality,filenames,questions):
Copy link
Member

Choose a reason for hiding this comment

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

add python typing lint

ding/worker/vllm_test_wqj.py Outdated Show resolved Hide resolved
#img_names=['/mnt/afs/niuyazhe/data/meme/data/Eimages/Eimages/Eimages/image_ (2)']
num_prompts=len(questions)
image_repeat_prob=None
modality = 'image'
Copy link
Member

Choose a reason for hiding this comment

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

use enum class to control this field rather than the naive string

ding/worker/vllm_test_wqj.py Outdated Show resolved Hide resolved
ding/worker/vllm_test_wqj.py Outdated Show resolved Hide resolved
ding/worker/vllm_test_wqj.py Outdated Show resolved Hide resolved
ding/worker/vllm_test_wqj.py Outdated Show resolved Hide resolved
ding/worker/vllm_test_wqj.py Outdated Show resolved Hide resolved
@PaParaZz1 PaParaZz1 mentioned this pull request Jan 24, 2025
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants