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

[BFCL] Support for pre-existing completion endpoint #864

Merged

Conversation

ThomasRochefortB
Copy link
Contributor

@ThomasRochefortB ThomasRochefortB commented Jan 2, 2025

URL Endpoint Support for BFCL

This PR is a product of the discussion in #850.

Description

This PR adds support for using pre-existing OpenAI-compatible endpoints in BFCL, allowing users to bypass the built-in vLLM/sglang server setup. This is particularly useful for distributed environments like SLURM clusters where model serving and benchmarking need to be handled as separate jobs.

Changes

  • Added --skip-server-setup flag to CLI
  • Added environment variable support for endpoint configuration:
    • VLLM_ENDPOINT (defaults to 'localhost')
    • VLLM_PORT (defaults to existing VLLM_PORT constant)
  • Modified OSSHandler to support external endpoints
  • Updated documentation for new configuration options

Usage

Users can now specify custom endpoints in two ways:

  1. Using environment variables:
export VLLM_ENDPOINT="custom.host.com"
export VLLM_PORT="8000"
  1. Using a .env file:
VLLM_ENDPOINT=custom.host.com
VLLM_PORT=8000

Then run BFCL with the --skip-server-setup flag:

python -m bfcl generate --model MODEL_NAME --backend vllm --skip-server-setup

Related Issue

Closes #850

Copy link
Collaborator

@HuanzhiMao HuanzhiMao left a comment

Choose a reason for hiding this comment

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

Thanks for the PR @ThomasRochefortB !

@HuanzhiMao HuanzhiMao merged commit 1729c9b into ShishirPatil:main Jan 3, 2025
@sghyan16
Copy link
Contributor

sghyan16 commented Jan 6, 2025

hi, I followed the instruction Using a .env file and use --skip-server-setup flag, but I encountered a problem that when I specify the MODEL_NAME, An error occured:

zz-8444 is not a local folder and is not a valid model identifier listed on 'https://huggingface.co/models'
If this is a private repository, make sure to pass a token having permission to this repo either by logging in with `huggingface-cli login` or by passing `token=<your_token>`

@HuanzhiMao
Copy link
Collaborator

hi, I followed the instruction Using a .env file and use --skip-server-setup flag, but I encountered a problem that when I specify the MODEL_NAME, An error occured:

zz-8444 is not a local folder and is not a valid model identifier listed on 'https://huggingface.co/models'
If this is a private repository, make sure to pass a token having permission to this repo either by logging in with `huggingface-cli login` or by passing `token=<your_token>`

Hey @sghyan16 ,
Could you open a issue for this and attach the console output as well? Thank you!

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.

[BFCL] URL endpoint support discussion
3 participants