argilla-io / distilabel

Distilabel is a framework for synthetic data and AI feedback for engineers who need fast, reliable and scalable pipelines based on verified research papers.
https://distilabel.argilla.io
Apache License 2.0
1.46k stars 113 forks source link

[DOCS] add clarification in distilabel vLLM reference to specify dtype #326

Closed kcentric closed 4 months ago

kcentric commented 8 months ago

Which page or section is this issue related to?

Currently the code snippet in the vLLM section of the guide (https://distilabel.argilla.io/latest/technical-reference/llms/#vllm) looks like:

llm = vLLM(
    model=LLM(model="argilla/notus-7b-v1"),
    task=TextGenerationTask(),
...

Running this as-is in a Colab notebook will result in "ValueError: Bfloat16 is only supported on GPUs with compute capability of at least 8.0. Your Tesla T4 GPU has compute capability 7.5." This is discussed in vLLM issues here.

Because everyone who uses Colab would likely use the T4 GPU (if they're on the free Colab at least), they'd face the same error every time if they copy our snippet from the Docs and try to test-run vLLM in their notebook.

I'd want to change the snippet to something like this:

llm = vLLM(
    model=LLM(model="argilla/notus-7b-v1", dtype="Bfloat16"),  # If using Tesla T4 on Colab, 
                                                      # specify dtype = float16 to prevent compute compatibility error
    task=TextGenerationTask(),

and add a brief clarification about it in the text with a link for anyone who wants to understand it further.

davidberenstein1957 commented 8 months ago

Hi @kcentric , feel free to create a PR for this.