Repository navigation
RPC Tensor-parallel: Caching graphs to reduce network overhead #29253
Alexander2995
started this conversation in
Show and tell
Replies: 1 comment 1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Hi llama community,
I was doing research on USB4 transport for RPC in split_mode tensor and found that before almost every compute phase server needs to get new graph again.
There is existing feature to reuse a graph but it works just for a single graph instance, for Gemma 31B there had been 241 graphs.
With help of AI I have made a patch to handle caching every reused graph by UID (used at least twice).
On my setup of 2 GMKtec K12 with AMD Ryzen 7 H255 PCs I have tested it and got roughly 2 times boost on token generation phase compared to master branch.
My setup:
K12-1 Ryzen H255 64gb DDR5 5600
K12-2 Ryzen H255 32gb DDR5 5600
transport - Ethernet 2.5G
API - Vulkan
Tests performed:
Could it be considered for PR/Enhancement? (code is tested on my setup)
I have made runtime option to set size for the cache.
Server reports feature in HELLO message and size is requested with separate new command.
Client manages caches for each server separately.
When overfilled cache resets on both sides with short log message. (tested)
Modification is backward-compatible. (older v7 nodes/clients will work without caching)
my fork with mod
Feedback/reports of tests on another setups are appreciated.
Regards,
Alexander2995
Topics related:
PR #26610 - RPC: add '-sm tensor'
PR #22701 — rpc: use graph uid instead of graph cache
Issue #22850 — Essential RPC performance degradation
All reactions