Commit Graph

242 Commits

Author SHA1 Message Date
Aleksandr Borzunov
dc813c426e Add src/petals/cli 2022-11-30 04:48:58 +00:00
Aleksandr Borzunov
43e13e1a12 Don't import the client into top-level petals package 2022-11-30 04:44:20 +00:00
Aleksandr Borzunov
3ae859858f Fix running speed test 2022-11-30 04:39:47 +00:00
Aleksandr Borzunov
24a60985c7 Fix project_name 2022-11-30 04:38:00 +00:00
Aleksandr Borzunov
86efab1fed Remove duplicate src 2022-11-30 04:36:59 +00:00
Aleksandr Borzunov
e8b2091a96 Use python -m petals.cli.run_server instead of `python -m
cli.run_server`
2022-11-30 04:32:55 +00:00
Aleksandr Borzunov
3ce3fc296d Move cli => src/petals/cli 2022-11-30 04:31:24 +00:00
Aleksandr Borzunov
67f96d49cf Fix scripts and notebooks 2022-11-30 04:28:31 +00:00
Aleksandr Borzunov
aab5c78e94 Update classifiers 2022-11-30 04:14:04 +00:00
Aleksandr Borzunov
eb628f6dfd Try installing hivemind==1.1.3 2022-11-30 04:00:52 +00:00
Aleksandr Borzunov
9c871a987a Try listing deps in setup.cfg 2022-11-30 03:57:17 +00:00
Aleksandr Borzunov
754b6e4745 Update pyproject.toml and setup.cfg 2022-11-30 03:55:09 +00:00
Aleksandr Borzunov
bb71bdfa65 Move petals => src/petals 2022-11-30 03:47:31 +00:00
Aleksandr Borzunov
ac22efb8b6 Specify petals-dev@googlegroups.com as an author 2022-11-30 03:44:52 +00:00
Aleksandr Borzunov
59db85174e Fix imports 2022-11-30 03:42:26 +00:00
Aleksandr Borzunov
625d042d0a Add package metadata to pyproject.toml 2022-11-30 03:34:58 +00:00
Aleksandr Borzunov
b6ebffe3f8 Expose BloomTokenizerFast in petals.client 2022-11-30 03:26:41 +00:00
Aleksandr Borzunov
d1c35b4f5f Rename src => petals 2022-11-30 03:25:53 +00:00
Alexander Borzunov
0c3781a89c
Shorten bullet points in readme 2022-11-30 07:20:27 +04:00
Alexander Borzunov
ab41223b17
Fix dtype- and device-related client issues (#98)
This PR:

1. Makes inference/forward/backward calls on client remember the dtype and device of source tensors, then move/cast the outputs to the same dtype/device. This way:
    - Users don't need to make changes in the code launching `RemoteSequential` to make it run on a different device.
    - `model.generate()` also starts to support both CPU and GPU.

2. Sets default `low_cpu_mem_usage=True`, client's request timeout to 20 sec.

3. Removes excess casts to float32 left in Dmitry's code.

4. (minor) Improves error messages.
2022-11-29 16:08:02 +04:00
Alexander Borzunov
c6e1b5a8e5
Add various server timeouts, lower --max_batch_size and --inference_max_length defaults (#97) 2022-11-29 10:00:47 +04:00
Alexander Borzunov
d8ef09146e
Improve server's logging (#96)
Log all RPC calls with block indices and shortened peer IDs, print attention cache stats.
2022-11-29 08:45:50 +04:00
Artem Chumachenko
fdb3583a8c
Add Beam Search decoding algorithm (#87)
Add beam_search
2022-11-28 13:02:07 +04:00
Alexander Borzunov
fef7257fe0
Try to fix protobuf versions once again (#95)
The goals of these changes are:

- Make Petals work in Colab right after just doing `pip install -r requirements.txt`
- Make tests work independently of the protobuf package version chosen while installing dependencies
2022-11-28 12:18:03 +04:00
Aleksandr Borzunov
1b51703444 Revert protobuf version change 2022-11-28 07:19:54 +00:00
Alexander Borzunov
b26b0b7121
Require hivemind with fixed compression and protobuf working on Colab (#94) 2022-11-28 10:51:37 +04:00
Alexander Borzunov
8a73b41a42
Make ServerState announcements work better (#93)
- Before this PR, `ServerState.JOINING` was announced only once. This announcement quickly expires in case of the full-size BLOOM, since loading blocks takes several minutes. This PR fixes it, so `ServerState.JOINING` is announced periodically in a thread until blocks are loaded.

- This PR also makes the `Server` class a non-thread, so it runs in the main thread and can catch `KeyboardInterrupt`. This is important, since if we are downloading blocks right now, we need to stop it and send the `ServerState.OFFLINE` message. Note that `ModuleContainer` is still a thread.

- (minor) For the sake of readability, I moved the `ModuleContainer.create()` definition, so it is now defined before `Server.__init__()` (this is because `.create()` is invoked first).
2022-11-28 07:44:03 +04:00
Alexander Borzunov
dc71574a63
Use public swarm by default (#92)
This PR makes servers and clients use public swarm's bootstrap peers if no other initial peers are specified.

If you'd like a server to start a new swarm, provide the `--new_swarm` CLI argument.
2022-11-28 03:44:41 +04:00
Alexander Borzunov
11d6ba683c
Make inference, forward, and backward fully fault-tolerant (#91) 2022-11-27 04:11:54 +04:00
Artem Chumachenko
695df826c2
Force reinstall for hivemind in example notebooks (#88) 2022-11-25 22:48:16 +04:00
Alexander Borzunov
dc6ecccac5
Implement timeouts in forward/backward (#90) 2022-11-25 10:43:36 +04:00
Aleksandr Borzunov
4518d65fdd Add MIT license 2022-11-24 22:25:51 +00:00
Alexander Borzunov
898f614515
Fix floating point issues in block_selection.py (#89) 2022-11-25 02:17:59 +04:00
Alexander Borzunov
c07a7e0812
Add "Terms of Use" 2022-11-21 18:54:07 +04:00
Artem Chumachenko
0d9c7de0bd
Add sst-2 ipynb example (#86)
- Add sst-2 example of a prompt-based training
- Have some enhancement in the persona-chat example
2022-11-07 13:55:00 +04:00
Alexander Borzunov
57e8d2e721
Implement exponential backoff for forward & backward (#85) 2022-11-02 01:21:15 +04:00
Alexander Borzunov
ee4e69c254
Enable rebalancing by default (#84) 2022-11-02 00:50:01 +04:00
Artem Chumachenko
2cb82dd648
Add colab-related changes (#80)
Add some stuff to work on COLAB more comfortable.

Co-authored-by: Alexander Borzunov <hxrussia@gmail.com>
2022-11-01 13:35:16 +04:00
Alexander Borzunov
87fd6a4f08
Fix "Too many open files" during rebalancing (#83)
Now, the number of open files stays the same after every rebalancing.
2022-11-01 04:37:13 +04:00
Alexander Borzunov
f64eb3a665
Update hivemind to 1.1.2, mark model argument as required (#81) 2022-10-26 03:23:18 +04:00
Alexander Borzunov
149f433763
Rebalance swarm when necessary (#34) 2022-10-12 14:28:27 +04:00
Alexander Borzunov
640bbc38a9
Make even smaller readability changes 2022-09-20 15:03:57 +04:00
Alexander Borzunov
d1b012b479
Make small readability & style changes to the instructions (#77) 2022-09-20 15:00:59 +04:00
justheuristic
fef48d7d99
Use bitsandbytes==0.34.0, update readme (#76)
* unlock bnb backward
* Fix bnb version in README
* Update requirements.txt
2022-09-20 13:07:34 +03:00
justheuristic
8caf1145a8
Quality of life changes: update readme, simplify run_server interface (#75)
- run_server now accepts model name as both positional and keyword argument
- changed names in README to account for interface updates
- moved model conversion from README to a separate wiki page
- updated requirements.txt
2022-09-20 03:51:57 +03:00
Artem Chumachenko
1046911dea
Add prompt tuning example on Personachat dataset (#69) 2022-09-19 14:52:35 +04:00
justheuristic
3fdcc55a56
fix protobuf version (#74)
* fix protobuf version
2022-09-18 04:54:08 +03:00
justheuristic
e92487e5d2
Update dependency versions (#71)
* update dependency versions
* install bitsandbytes cpuonly from pip
* remove deprecated API from task pool
* clearer startup logs

Co-authored-by: Tim Dettmers <dettmers@cs.washington.edu>
2022-09-13 03:51:15 +03:00
Pavel Samygin
50535a8435
Priority tasks (#47)
* priority in handlers and backend pools
* simple points system on server side
* priortize task in handler before submit task
* fix tests
* s/expert/block/g

Co-authored-by: justheuristic <justheuristic@gmail.com>
2022-09-10 22:24:42 +03:00
justheuristic
892d18fea7
Build cpuonly from bitsandbytes main (#70)
Build cpuonly from main
2022-09-08 21:06:19 +03:00