Commit Graph

508 Commits (main)
 

Author SHA1 Message Date
Max Ryabinin 793726b041
Speed up loading blocks using init with meta weights (#285)
* Init WrappedBloomBlock with meta weights

---------

Co-authored-by: Alexander Borzunov <borzunov.alexander@gmail.com>
1 year ago
Alexander Borzunov c519bffc59
Bump version to 1.1.3 (#278) 1 year ago
Alexander Borzunov aae1f4f368
Increase default request_timeout (#276)
This PR increases `request_timeout`, since the previous default of 30 sec is not enough for many use cases.

Previously, we kept the request timeout low since we assumed that the server could freeze on dial if the target peer is behind a firewall. However, apparently, it won't freeze because libp2p has its own [dial timeout](https://github.com/libp2p/go-libp2p/blob/v0.26.0/core/network/context.go#L11).
1 year ago
justheuristic fb2583b682
Use inference mode in _MergedInferenceStep (#275) 1 year ago
Alexander Borzunov fd9400b392
Fix use_chunked_forward="auto" on non-x86_64 machines (#267)
Import of cpufeature may crash on non-x86_64 machines, so this PR makes the client import it only if necessary.
1 year ago
Alexander Borzunov a2e7f27a5a
Improve "connect your GPU" message (#266) 1 year ago
Alexander Borzunov fee19e9b9b
Use get_logger(__name__) instead of get_logger(__file__) (#265) 1 year ago
Alexander Borzunov 55e7dc07a0
Limit max delay between retries to 15 min (#264) 1 year ago
Alexander Borzunov 38b071135b
Show visible maddrs for public swarm too (#263) 1 year ago
Alexander Borzunov 42594e5173
Link FAQ in readme (#260) 1 year ago
Alexander Borzunov 2a5070aa1a
Improve reachability logs (#253) 1 year ago
Alexander Borzunov 4091db10bf
Lower payload size threshold for stream handlers (#251)
Hotfix: we add "// 2" since hivemind==1.1.5 serializes bfloat16 tensors in float32, so they take 2x more space.
1 year ago
Alexander Borzunov 9954cb84fe
Add `allowed_servers`, `max_retries` options to the client, improve logs (#235) 1 year ago
Alexander Borzunov 3c523ab0d2
Fix TP crashing when hypo_ids are used (#249) 1 year ago
justheuristic b8a6788490
Fix examples/sst, add cls_model embeddings (#248) 1 year ago
justheuristic 8766a14d28
Minor changes to examples/prompt-tuning notebooks (#247)
Minor code changes required to run the notebook in a clean python environment
1 year ago
Alexander Borzunov 5367523df8
Fix typo in prompt-tuning-sst2.ipynb (#245) 1 year ago
Alexander Borzunov b03efb1ef5
Bump version to 1.1.2 (#244) 1 year ago
Alexander Borzunov 5d7395e1b5
Prompt-tuning notebooks: suggest to use a smaller model for faster prototyping (#234) 1 year ago
Artem Chumachenko d4c687daca
Fix dtype error in fine-tuning notebooks (#231) 1 year ago
Muhtasham Oblokulov 0ebf6de117
Add citation to readme (#219)
Co-authored-by: Alexander Borzunov <borzunov.alexander@gmail.com>
1 year ago
justheuristic c4938bc23e
Merge inference pools into one to increase inference speed (#225)
It turns out using a separate pool for each block has led to significant slowdown, see #224 for details.
1 year ago
Shuchang Zhou 3189b395f0
Fix a typo in error message (#227)
By the code context, it can be inferred that do_sample==False when control reaches this point.
1 year ago
Alexander Borzunov fa5ac6e3b4
Mention BLOOMZ in readme (#221) 1 year ago
Alexander Borzunov e651d73f11
Add one more link to the "Getting started" tutorial (#218)
Some people miss the "Try now in Colab" link or don't understand that it leads to the comprehensive tutorial, so I added one more explicit link.
1 year ago
Alexander Borzunov af3da5bb04
Choose --num_blocks automatically for all models (#217) 1 year ago
Alexander Borzunov cea83d3356
Bump version to 1.1.1 (#214) 1 year ago
Alexander Borzunov 702bb5a2c2
CI: Update deprecated actions, don't measure network RPS (#215)
* CI: Switch to actions/cache@v3 (v2 is deprecated)
* Don't run measure_network_rps() in tests since it doesn't work well in
CI
1 year ago
Alexander Borzunov 825f5dbf2d
CI: Convert model only when convert_model.py or setup.cfg change (#213)
This reduces the test running time by 2 times, unless convert_model.py or setup.cfg are changed.
1 year ago
Alexander Borzunov 5ff250bee9
Improve errors in case of missing blocks, suggest to join your own server (#212) 1 year ago
Alexander Borzunov 6ba63c6cc8
Fix output shape when resuming generation (#211)
Before this PR, `model.generate()` returned one excess token when resuming generation with an existing (the last token of the previous session, `session.last_token_id`). This is an unexpected behavior not convenient for the downstream apps, so this PR changes it until it's too late.
1 year ago
Alexander Borzunov cc5e5d32c0
Don't switch blocks if it makes swarm disjoint (#210)
Even if the swarm seems to have at least 2 servers for each block, turning off on one of the servers could break it. That's because once a server is turned off, others may move to a better position, creating a significant downtime on their way. This PR prohibits switching blocks if it would make the swarm disjoint along the way.
1 year ago
Alexander Borzunov 6b12b0d050
Report server version and dht.client_mode in rpc_info(), check for updates on startup (#209)
This PR:

1. Shows the current Petals version and checks for updates on startup.
2. Reports the current version and DHT mode in `rpc_info()`, so it can be shown on http://health.petals.ml or used on clients for efficient routing.
1 year ago
justheuristic 771ca590e7
Add service checking direct reachability from peers (#195)
Servers joining from behind NATs/firewalls usually take several minutes to join a libp2p relay before they become accessible from the outside Internet. Moreover, requests to such servers are slower and more likely to fail (e.g., if the server switches a relay at the moment). If such servers host certain DHT keys, the swarm may occasionally lose read/write access to these keys, which results in:

- Clients being unable to find any servers hosting a certain block.
- All servers starting rebalancing to the same place to close the alleged "gap" in the swarm.

This PRs modifies servers so that DHT keys are only hosted on **directly reachable** servers (the ones who aren't behind NAT/firewall). This way, DHT becomes more stable and works faster. Of course, trhe servers behind NATs/firewalls still accept requests for running inference/forward/backward for blocks they hold (it's more acceptable for this kind of requests to be slower or fail).

Co-authored-by: Alexander Borzunov <borzunov.alexander@gmail.com>
1 year ago
justheuristic 5f58f00649
Return available cache size in rpc_info() (#191)
This PR makes servers return their free cache (in tokens * layers to make it compression-agnostic)

To be used when calling make_sequence(optimize="inference")
1 year ago
Alexander Borzunov 37373a66c3 Update Anaconda installation commands (#205) 1 year ago
justheuristic 012f840f7e
Use length-weighted sampling in routing for inference (#204)
This pull-request implements a simple (1) greedy (2) latency-agnostic routing optimization that should speed up both our use cases.

Why this exists: our effort to merge full routing (ping-aware, throughut-aware, dijkstra) is in a sorry state between several branches; merging it into main would take many days.

Co-authored-by: Aleksandr Borzunov <borzunov.alexander@gmail.com>
1 year ago
Alexander Borzunov 42d1bbb568
Fix --no_auto_relay help (#199) 1 year ago
justheuristic c2cb6d19ae
Increase tolerances in test_tp_block (#196)
deflapify tests
1 year ago
Alexander Borzunov b4f3224cda
Make client ignore blacklist if all servers holding a block are blacklisted (#197)
If all servers holding a certain block are blacklisted, we should display errors from them instead of raising `No peers holding blocks`.

Indeed, if the error is client-caused, the client should learn its reason from the latest error messages. In turn, if the error is server/network-caused and we only have a few servers, we'd better know the error instead of banning all the servers and making the user think that no servers are available.
1 year ago
Alexander Borzunov 127cf66bee
Ignore network RPS if we failed to measure it (#198) 1 year ago
Alexander Borzunov 487411e87e
Fix fine-tuning notebooks intros (#194)
The notebook intros were outdated and mentioned the 6B model, while the actual code already runs the 176B model. This led to confusion among our users in Discord.
1 year ago
Alexander Borzunov 82c9f93ce6
Bump version to 1.1.0 (#190) 1 year ago
Alexander Borzunov a617ce3cfa
Fix psutil-related AccessDenied crash, disable --load_in_8bit by default in case of TP (#188)
* Don't count open fds since it leads to AccessDenied crashes on some machines
* Use --load_in_8bit=False by default in case of tensor parallelism
* Install petals from PyPI in fine-tuning tutorials
1 year ago
Egiazarian Vage 93bed7da5a
Support libp2p relays for NAT traversal (#186)
- Added relay options to servers
- Enabled relay options by default
- Changed hivemind version to 1.1.5
- Moved reachability check to be performed after blocks are loaded

Co-authored-by: Alexander Borzunov <borzunov.alexander@gmail.com>
1 year ago
Alexander Borzunov 16b69d6050
Fix GiBs in the "insufficient disk space" message (#187) 1 year ago
Alexander Borzunov 391c855208
Add readme subsections (#185) 1 year ago
Alexander Borzunov f344c7801b
Add link to health.petals.ml to readme (#184) 1 year ago
Alexander Borzunov 27406a9377
Add more links to BLOOM to readme (#183) 1 year ago
Alexander Borzunov 0f6464103d
Remove protobuf from requirements (#182)
A correct protobuf version should be already installed by hivemind.

This also resolves version conflict on Colab, where protobuf versions required by Petals were different from the ones required by pre-installed tensorflow and tensorboard packages.

Co-authored-by: Max Ryabinin <mryabinin0@gmail.com>
1 year ago