Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Feat: adding rpc_servers parameter to Llama class #1477

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

Merged
merged 8 commits into from
Jun 4, 2024

Conversation

chraac
Copy link
Contributor

@chraac chraac commented May 23, 2024

This PR include those changes:

  • Add rpc_servers to Llama, to bypass the rpc_servers to llama.cpp lib
  • In Makefile, add item to enable LLAMA_RPC flag
  • Update the llama.cpp submodule reference to latest version

Tested on my machine, work as expected

Closes #1455

@chraac chraac changed the title adding rpc_servers parameter to Llama class adding rpc_servers parameter to Llama class May 23, 2024
@chraac chraac changed the title adding rpc_servers parameter to Llama class Feat: adding rpc_servers parameter to Llama class May 23, 2024
@chraac chraac force-pushed the dev-add-rpc branch 3 times, most recently from f86d077 to 00a34ea Compare May 25, 2024 11:15
@abetlen
Copy link
Owner

abetlen commented May 27, 2024

@chraac great work! Could you also include the build flags in the README as well as maybe a small section on running the rpc servers?

@chraac
Copy link
Contributor Author

chraac commented May 27, 2024

@chraac great work! Could you also include the build flags in the README as well as maybe a small section on running the rpc servers?

yeah, sure, will add to readme, thanks for the reply!

@chraac chraac force-pushed the dev-add-rpc branch 2 times, most recently from 12bac9b to 7854795 Compare May 29, 2024 03:49
@chraac
Copy link
Contributor Author

chraac commented May 29, 2024

@abetlen add a section in README.md about how to build the rpc backend.

@chraac chraac force-pushed the dev-add-rpc branch 3 times, most recently from d0a79b8 to 40e3247 Compare June 4, 2024 03:52
@chraac
Copy link
Contributor Author

chraac commented Jun 4, 2024

@abetlen , could you have another look in convenient please? have added a section regarding how to build the RPC backend package.

@abetlen abetlen merged commit d634efc into abetlen:main Jun 4, 2024
16 checks passed
@chraac chraac deleted the dev-add-rpc branch June 4, 2024 14:38
@juanjfrancisco
Copy link

Hi, I apologize for asking this here, but I'm trying to understand how to use the RPC_SERVERS functionality to enable inference across multiple machines. Can anyone help clarify this for me or give me an example?. Thanks in advance.

@statchamber
Copy link

How do I use this...?

@chraac
Copy link
Contributor Author

chraac commented Aug 30, 2024

Hi @juanjfrancisco @statchamber , sorry for the inconvient here, currently the GGML_RPC flag is disabled by default at the upstream repo, so you maight need to install the python package from the source:

  1. clone the repo: git clone https://github.com/abetlen/llama-cpp-python.git
  2. For rpc client, which is the endpoint that make the rpc request, could be installed by following command into python env:
    CMAKE_ARGS='-DGGML_RPC=on -DGGML_OPENMP=on' python3 -m pip install --verbose -e .
  3. For the rpc server that will actually execute the rpc request, could be installed by:
    cd vendor/llama.cpp
    mmkdir -p build_rpc_client
    pushd  build_rpc_client
    cmake -DGGML_RPC=ON -DGGML_CUDA=ON .. && cmake --build . --config Release
    popd
    

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.

Add RPC backend support
4 participants