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

docs: Added LLM example #1545

Merged
merged 12 commits into from
Jul 8, 2024
Merged

docs: Added LLM example #1545

merged 12 commits into from
Jul 8, 2024

Conversation

ytjhai
Copy link
Contributor

@ytjhai ytjhai commented Jun 27, 2024

I noticed there had been a few issues like #206 and #261 for demoing Pixi with an ML stack. This example shows it's possible with the current feature set to run Llama-index with llama.cpp on a local machine with a Mistral LLM, also running locally with GPU support on an ARM M1 Mac. Hopefully this helps someone else get started with LLM inference.

@ytjhai ytjhai changed the title Added LLM example docs: Added LLM example Jun 27, 2024
@tdejager
Copy link
Contributor

tdejager commented Jul 1, 2024

Hi @ytjhai, thanks a lot for the PR.

Would you be open to adding

# linux-64 to the platforms
platforms = ["osx-arm64", "linux-64"]

# setting this avoids building scikit_learn from source (on arm)
[system-requirements]
macos = "12.0"

@tdejager
Copy link
Contributor

tdejager commented Jul 1, 2024

Hi @ytjhai, thanks a lot for the PR.

Would you be open to adding

# linux-64 to the platforms
platforms = ["osx-arm64", "linux-64"]

# setting this avoids building scikit_learn from source (on arm)
[system-requirements]
macos = "12.0"

Even better would be having separate features and environments. Where the system-requirement for osx-arm64 and osx are different. This would allow older non-arm osx versions.

avoid building sk-learn from source for ARM
@ytjhai
Copy link
Contributor Author

ytjhai commented Jul 1, 2024

I don't currently have access to a linux machine, so can't 100% verify if this lock file would work on linux-64. But I could put a test environment together when I have some time? It would have an AMD GPU, which is a bit off the beaten path (similar to the idea behind this build).

Regarding older OSX environments, GPU strength was very patchy and my personal use case was running some LLMs locally since M1 has good GPU support in even base models (like the Mac Mini). Even llama.cpp doesn't support that architecture on Macs AFAIK.

@Hofer-Julian
Copy link
Contributor

I don't currently have access to a linux machine, so can't 100% verify if this lock file would work on linux-64. But I could put a test environment together when I have some time? It would have an AMD GPU, which is a bit off the beaten path (similar to the idea behind this build).

I tested it with an AMD GPU (I assume it is using the CPU though) and it seems to work fine :)

Add linux-64 as a supported architecture
Updated description
@ytjhai
Copy link
Contributor Author

ytjhai commented Jul 1, 2024

Great! I made the above requested changes, adding linux-64 as a supported environment

Copy link
Contributor

@ruben-arts ruben-arts left a comment

Choose a reason for hiding this comment

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

Awesome thanks!

@tdejager
Copy link
Contributor

tdejager commented Jul 4, 2024

Last, tiny small thing, could you maybe add a pixi run start task that runs the python command :)?

@tdejager
Copy link
Contributor

tdejager commented Jul 5, 2024

Last, tiny small thing, could you maybe add a pixi run start task that runs the python command :)?

Don't worry I've added it :)

Copy link
Contributor

@Hofer-Julian Hofer-Julian left a comment

Choose a reason for hiding this comment

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

Thanks!

@tdejager tdejager merged commit 5c6ea57 into prefix-dev:main Jul 8, 2024
24 of 25 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.

4 participants