Skip to content

[BOUNTY - $500] Llama.cpp inference engine #167

Closed

Description

@AlexCheema
  • it should automatically detect the best device to run on
  • We should require 0 manual configuration from the user, by default llama.cpp for example requires specifying the device

Activity

  1. danny-avila commented on Aug 25, 2024

    @danny-avila

    Thanks @AlexCheema

    Myself and many others likely only have windows systems, and llama.cpp is practically the only option.

    MLX is macOS and tinygrad:

    Windows support has been dropped to focus on Linux and Mac OS.
    Some functionality may work on Windows but no support will be provided, use WSL instead.
    source: https://github.com/tinygrad/tinygrad/releases/tag/v0.7.0

    For this opening statement to be true, it would need to include windows-based systems, especially old gaming rigs.

    Forget expensive NVIDIA GPUs, unify your existing devices into one powerful GPU: iPhone, iPad, Android, Mac, Linux, pretty much any device!

    At the very least, a thorough guide on setting up tinygrad via WSL/WSL2 would be appreciated, because this is your only documentation:

    Example Usage on Multiple MacOS Devices

  2. bayedieng commented on Aug 27, 2024

    @bayedieng
    Contributor

    I'd like to look into this. Adjacently, llamafiles might be worth looking into as they are binaries able to run on multiple desktop OSes without any configuration. Though I'm not sure about Android or IOS support.

  3. AlexCheema commented on Aug 27, 2024

    @AlexCheema
    ContributorAuthor

    I'd like to look into this. Adjacently, llamafiles might be worth looking into as they are binaries able to run on multiple desktop OSes without any configuration. Though I'm not sure about Android or IOS support.

    Go for it!

  4. AlexCheema commented on Aug 27, 2024

    @AlexCheema
    ContributorAuthor

    @bayedieng I'd recommend looking at https://github.com/abetlen/llama-cpp-python -- it should hopefully be low level enough to do what we need to do. Also, I'd recommend looking at #139 for a minimal implementation of an inference engine that doesn't require explicitly defining every model -- it's a general solution.

  5. bayedieng commented on Aug 27, 2024

    @bayedieng
    Contributor

    Thanks for the suggestion. Yeah I had already seen the python bindings and went ahead and began a draft PR.

  6. thegodone commented on Sep 14, 2024

    @thegodone

    I wonder if WebGPU can be plugged on top of Llama.cpp via this https://github.com/AnswerDotAI/gpu.cpp wrapper ?

  7. bayedieng commented on Sep 21, 2024

    @bayedieng
    Contributor

    It would seem that the LLAMA CPP API is too high level to perform sharded inference as it doesn't provide access to individual layers. In order to do so, one would have to use the GGML bindings directly to create a suitable inference engine compatible with Exo.

    It was stated that it would be nice to have a similar API as the Pytorch engine where a base model and reused everywhere as provided with AutoModelForCausalLM however, GGML does not provide a simmilar API for inference, so each model would have to likely be implmented the same way that tinygrad and mlx does it.

    @AlexCheema please let me know if you'd like to go forward and build the inference engine with ggml bindings.

  8. danny-avila commented on Sep 21, 2024

    @danny-avila

    Heads up, LocalAI now has distributed inference:

    https://localai.io/features/distribute/

  9. bayedieng commented on Sep 21, 2024

    @bayedieng
    Contributor

    Heads up, LocalAI now has distributed inference:

    https://localai.io/features/distribute/

    Not familiar with them but they also likely just use the underlying GGML API as well, considering LLama CPP does inference end-to-end. LLama CPP also has a distributed inference example using GGML:

    https://github.com/ggerganov/llama.cpp/tree/master/examples/rpc

  10. bayedieng commented on Oct 25, 2024

    @bayedieng
    Contributor

    I've been caught up recently in a whole bunch of work recently and have had little time to work on the LLama support. I wouldn't would to hold the PR hostage if someone's capable of completing it go ahead!

  11. removed their assignment
    on Oct 25, 2024
  12. SureD commented on Dec 8, 2024

    @SureD

    agree

    Heads up, LocalAI now has distributed inference:
    https://localai.io/features/distribute/

    Not familiar with them but they also likely just use the underlying GGML API as well, considering LLama CPP does inference end-to-end. LLama CPP also has a distributed inference example using GGML:

    https://github.com/ggerganov/llama.cpp/tree/master/examples/rpc

    Thanks for the info. I looked through the RPC example and found out that it uses the GGML RPC backend. With other backends, it is scheduled by GGML, which requires all nodes to be GGML nodes.

    However, in Exo, each node is independent, and some nodes may not use the GGML backend. So, I think we can just use the GGML backend API and then wrap it up for Exo.

  13. added a commit that references this issue on Dec 21, 2024
  14. Xeddius commented on Feb 18, 2025

    @Xeddius

    For automatic detection you can look into Koboldcpp's implementation.

  15. Leeaandrob commented on Mar 22, 2025

    @Leeaandrob

    Excited about it

  16. Material-Scientist commented on Apr 29, 2025

    @Material-Scientist

    Looking forward

  17. karsontsang23 commented on Aug 8, 2025

    @karsontsang23

    @AlexCheem I'd recommend looking at https://github.com/ADT109119/llamacpp-distributed-inference -- it is a llamacpp-distributed-inference ,you need this to help you .

  18. Evanev7 commented on Dec 18, 2025

    @Evanev7
    Member

    We're closing bounties, thank you to all who contributed, and apologies that we left this unmanaged for so long.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions