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

How to send CURL request for MLLM models? #3971

Closed
1 task done
anidh opened this issue May 29, 2024 · 8 comments
Closed
1 task done

How to send CURL request for MLLM models? #3971

anidh opened this issue May 29, 2024 · 8 comments
Labels
solved This problem has been already solved

Comments

@anidh
Copy link

anidh commented May 29, 2024

Reminder

  • I have read the README and searched the existing issues.

Reproduction

Hi There,
I am trying to run inference of MLLM models using the CUDA_VISIBLE_DEVICES=0 llamafactory-cli api training_recipes/infer.yaml command which starts a local open ai like api server.
I want to now send images with prompt to this server to do inference.
How can I send a CURL request for the same?

Expected behavior

I would like to be able to send a curl request with image and get status 200 response.

System Info

  • transformers version: 4.41.0
  • Platform: Linux-5.15.0-107-generic-x86_64-with-glibc2.35
  • Python version: 3.10.12
  • Huggingface_hub version: 0.23.1
  • Safetensors version: 0.4.3
  • Accelerate version: 0.30.1
  • Accelerate config: not found
  • PyTorch version (GPU?): 2.3.0+cu121 (True)
  • Tensorflow version (GPU?): not installed (NA)
  • Flax version (CPU?/GPU?/TPU?): not installed (NA)
  • Jax version: not installed
  • JaxLib version: not installed
  • Using GPU in script?: Yes
  • Using distributed or parallel set-up in script?: Parallel

Others

No response

@anidh
Copy link
Author

anidh commented May 29, 2024

@BUAADreamer @hiyouga

@hiyouga hiyouga added the pending This problem is yet to be addressed label May 29, 2024
@hiyouga
Copy link
Owner

hiyouga commented May 29, 2024

The openai API does not support vision models yet, it will supported in the future version

@anidh
Copy link
Author

anidh commented May 29, 2024

@hiyouga Thanks for the prompt response. So right now there is now way to feed multiple images to the model? Or do it programmatically through python?

@anidh
Copy link
Author

anidh commented May 29, 2024

The only way I am guessing right now is to load the weights in HF library and do inference using that?
@hiyouga

@hiyouga
Copy link
Owner

hiyouga commented May 29, 2024

the model we supported accepts only one image at inference, you can use llamafactory-cli webchat to launch a web interface

@anidh
Copy link
Author

anidh commented May 29, 2024

Thanks!

@anidh anidh closed this as completed May 29, 2024
@hiyouga hiyouga added solved This problem has been already solved and removed pending This problem is yet to be addressed labels May 29, 2024
hiyouga added a commit that referenced this issue Jun 5, 2024
@hiyouga
Copy link
Owner

hiyouga commented Jun 5, 2024

update: now api mode supports image inputs

@anidh
Copy link
Author

anidh commented Jun 5, 2024

Thanks for the update!! 😀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
solved This problem has been already solved
Projects
None yet
Development

No branches or pull requests

2 participants