Skip to content

Conversation

@wheresmyhair
Copy link
Collaborator

This PR introduces a unified data exchange protocol as a pilot implementation, enabling batch operations and improving developer experience.

@wheresmyhair
Copy link
Collaborator Author

Comments on force-pushes: removed some personal info

Copy link
Contributor

@research4pan research4pan left a comment

Choose a reason for hiding this comment

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

LGTM. Support unified data protocol for inference purposes (support sglang first for now).

Main Features

  • Support unified data protocol DataProto for sglang (vllm not implemented yet)
    • src/lmflow/models/hf_decoder_model.py
      • lines 450: use "sampling_params" in inputs, allowing compatibility with vllm sampling params
    • src/lmflow/pipeline/sglang_inferencer.py
    • src/lmflow/utils/protocol.py

Details

  • Change --save_results argument to --save_inference_results, --save_results argument will be deprecated in future versions (still supported in this version)

    • examples/rm_inference.py
    • scripts/archive/run_rm_inference.sh
    • scripts/archive/run_vllm_inference.sh
    • scripts/run_sglang_inference.sh: lines 11-12
    • src/lmflow/args.py
    • src/lmflow/pipeline/sglang_inferencer.py
  • Change default dataset example in scripts/run_sglang_inference.sh (line 3)

  • Change save format from json to pkl

    • src/lmflow/pipeline/sglang_inferencer.py
  • Add tensordict to requirements.txt

  • Add useful util functions in src/lmflow/utils/envs.py

  • Improve README.md

  • Improve gitignore

Suggestions

  • src/lmflow/pipeline/sglang_inferencer.py, line 104-106: better support json-format output as well, since pkl is normally not human-readable

@research4pan research4pan merged commit 30949ba into main Jan 3, 2026
2 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.

3 participants