IPFS ACCELERATE
This is meant to be an extension of the Huggingface accelerate library, is to act as a model server, which can contain lists of other endpoints to call, or can call a local instance, and can respond to external calls for inference. I have some modular back ends, such as Libp2p, Akash, Lilypad, Huggingface Zero, Vast AI, which I use for autoscaling. If the model is already listed in the ipfs_model_manager there should be an associated hw_requirements key of the manifest. In the case of libp2p the request to do inference will go out to peers in the same trusted zone, if there are no peers in the network available to fulfill the task, and it has the resources to run the model localliy it will do so, otherwise a docker container will need to be launched with one of the providers here.
Instructions:
run.sh -- this will run the model server
init.sh -- this will initialize the endpoints and models that you want to use
queue.sh -- this will add an item to the model queue, and the endpoints will pull items from their model queue.
infer.sh -- this will select a random endpoint for the requested model to perform inference.
Usage
from ipfs_accelerate_py import ipfs_accelerate_py
model_server = ipfs_accelerate_py()
init_model_server = model_server.init_endpoints(models, endpoints)
endpoints = model_server.resources["endpoint_handler"][model[0]]
for endpoint in list(endpoints.keys()):
endpoint("hello world")
BACKENDS
You can spin up additional model endpoints with the following:
Method #1 Huggingface Hugs
Method #2 Akash
Method #3 Lilypad
Method #4 Vast AI
IPFS Huggingface Bridge:
for huggingface transformers python library visit: https://github.com/endomorphosis/ipfs_transformers/
for huggingface datasets python library visit: https://github.com/endomorphosis/ipfs_datasets/
for faiss KNN index python library visit: https://github.com/endomorphosis/ipfs_faiss
for transformers.js visit:
https://github.com/endomorphosis/ipfs_transformers_js
for orbitdb_kit nodejs library visit: https://github.com/endomorphosis/orbitdb_kit/
for fireproof_kit nodejs library visit: https://github.com/endomorphosis/fireproof_kit
for ipfs_kit nodejs library visit: https://github.com/endomorphosis/ipfs_kit/
for python model manager library visit: https://github.com/endomorphosis/ipfs_model_manager/
for nodejs model manager library visit: https://github.com/endomorphosis/ipfs_model_manager_js/
for nodejs ipfs huggingface scraper with pinning services visit: https://github.com/endomorphosis/ipfs_huggingface_scraper/
for ipfs agents visit: https://github.com/endomorphosis/ipfs_agents/
for ipfs accelerate visit: https://github.com/endomorphosis/ipfs_accelerate/
Author - Benjamin Barber QA - Kevin De Haan
Metadata
Release files for ipfs-accelerate-py 0.0.42
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| ipfs_accelerate_py-0.0.42.tar.gz | 70.0 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ipfs_accelerate_py-0.0.42-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 152.8 kB
Release files / ipfs_accelerate_py-0.0.42.tar.gz
| Download URL | ipfs_accelerate_py-0.0.42.tar.gz |
|---|---|
| Size | 70.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3f330f0a94d0bf1f8bc39c71205180ee6d957c471a81198e3a7074d8c5a663ef
|
|
BLAKE2b-256 checksum How to use checksums |
24453fd4ba22e2fc665586183a2cfac3ea01f6995de61c8882c9218fd1a804b0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.3
|
Release files / ipfs_accelerate_py-0.0.42-py3-none-any.whl
| Download URL | ipfs_accelerate_py-0.0.42-py3-none-any.whl |
|---|---|
| Size | 82.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fc31500c7f9c5bffc4c4b1a5e9e7c2653362fc2cfbb76986636955e30ab4ebdd
|
|
BLAKE2b-256 checksum How to use checksums |
8e30788ba47a627339685097f2afad40c4c0e43b0bcec26b64aa5de634b4027f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.3
|
Security for ipfs-accelerate-py 0.0.42
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.