Commit Graph

375 Commits (download_8bit_weights)
 

Author SHA1 Message Date
Max Ryabinin a610f4d744 Remove load_in_8bit from convert_block 1 year ago
Max Ryabinin 556f0fabe0 Set device_map only for int8 1 year ago
Max Ryabinin d70019f2b6 Fix formatting 1 year ago
Max Ryabinin b624f9048e Support saving and loading 8-bit block weights 1 year ago
Alexander Borzunov c0e0e1319d
Force transformers to use config.torch_dtype by default (#307) 1 year ago
Alexander Borzunov 98be9ffe4c
Relax the rest of Hugging Face dependencies (#305) 1 year ago
Alexander Borzunov 5c0b4286b2
Suggest commands for Docker first (#304) 1 year ago
Alexander Borzunov 35662b4a16
Require bitsandbytes == 0.38.0.post2, hivemind == 1.1.7 (#302)
In particular, this PR fixes 8-bit support on nvidia16 GPUs (such as 1660) by including https://github.com/TimDettmers/bitsandbytes/pull/292. This support was requested multiple times on Discord.
1 year ago
Alexander Borzunov 21c3526ec1
Start SequenceManager's thread only after first .make_sequence() (#301)
**Why?**

- We'd like to avoid excess threads for the original sequence manager in case if we only use its slices (e.g. when we add adapters or need only a subset of model blocks):

- If we create a sequence manager just before a fork (e.g. in a web app backend or a multi-thread benchmark), we'd like to avoid excess threads in the original process and only use this thread in child processes where we actually call `.make_sequence()`.
1 year ago
Alexander Borzunov 6c6150f684
Remove use_auto_relay=True in client (#300)
`use_auto_relay=True` makes the libp2p daemon look for relays to become reachable if we are behind NAT/firewall. However, being reachable is not necessary for the Petals client, and we should not spend the relays' capacity on this.
1 year ago
Alexander Borzunov 892fa2386a
Remove CustomLinear8bitLt (#297)
This became a part of https://github.com/TimDettmers/bitsandbytes/releases/tag/0.37.0.
1 year ago
Alexander Borzunov 74d8cda8c4
Add Python 3.10 to CI (#299) 1 year ago
Alexander Borzunov 2116df08bc
Fix deps, enable 8-bit by default for TP (#298)
This PR fixes issues of #290:

- hivemind bfloat16 codec crashed on dummy tensors (with 0 elements), see https://github.com/learning-at-home/hivemind/pull/560 (this PR makes Petals depend on the latest hivemind version from the repo, it's temporary)
- transformers version check mismatched with the version allowed in `setup.cfg`

Also:

- This PR enables 8-bit by default for TP. Even though TP in 8-bit may be slower, we currently prefer to host more blocks to increase the network's stability.
1 year ago
justheuristic 987f4d2b2f
Update bitsandbytes, hivemind, transformers (#290)
- new bitsandbytes supports newer *and* older GPUs
- new hivemind supports a better bfloat16 codec

Co-authored-by: Alexander Borzunov <borzunov.alexander@gmail.com>
1 year ago
Alexander Borzunov e0cef73757
Hotfix: Increase daemon_startup_timeout (#292)
For some reasons, right now 15 sec is not enough to connect to the bootstrap peers in the public swarm, as reported by multiple users and observed by me. Increasing it to 120 sec until we find the root cause of the issue.
1 year ago
Alexander Borzunov a7d3d02194
Fix invalid author email in setup.cfg (#287) 1 year ago
Alexander Borzunov 8dab37c1a9
Add benchmarks to readme (#284) 1 year ago
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