Multi-threaded Reasoning for Large Language Models
Project description
RiCA: Multi-threaded Reasoning for Large Language Models
| English | 中文 |
|---|
RiCA is a framework that enables Large Language Models (LLMs) to perform multi-threaded reasoning. It allows LLMs to call external tools, continue thinking while waiting for the results, and handle multiple tool calls concurrently.
Key Features
- Multi-threaded Reasoning: LLMs can execute long-running tasks in the background without blocking their thought process.
- Tool Integration: Easily integrate external tools and APIs through a simple decorator-based routing system.
- Real-time Interaction: Observe the model's "thinking" process in real-time through token-by-token streaming.
- Flexible and Extensible: Designed to be adapter-based, allowing for easy integration with different LLM backends (e.g., Transformers, OpenAI).
Getting Started
Installation
You can install RiCA and its dependencies using pip:
pip install .[pt]
Running the Demo
The demo/example.py script provides a simple example of how to use RiCA. To run it, first make sure you have the necessary dependencies installed, then run the following command from the project root:
PYTHONPATH=. python demo/example.py
You can also explore the demo.ipynb notebook for a more interactive experience.
How it Works
RiCA works by introducing a "multi-threaded thinking" capability to LLMs. When an LLM needs to use an external tool, it can choose to run it in the background. While the tool is running, the LLM can continue to reason, process information, and even call other tools. When a background tool finishes, its result is seamlessly inserted back into the LLM's context, allowing it to incorporate the new information into its reasoning process.
Documentation
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file rica_server-0.0.1.dev3.tar.gz.
File metadata
- Download URL: rica_server-0.0.1.dev3.tar.gz
- Upload date:
- Size: 30.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d8f673272a2a6e075fa0983c5d1ae2928936bc72d7f39b52d23d27b00c2ea005
|
|
| MD5 |
169a7f1c8e7c31e3e3e3dd0b7d032999
|
|
| BLAKE2b-256 |
d640802310cb6e3f29da74ebf9908635518c497e56a29c748ddc208f418be6d5
|
Provenance
The following attestation bundles were made for rica_server-0.0.1.dev3.tar.gz:
Publisher:
pypi.yml on rica-team/rica-server
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rica_server-0.0.1.dev3.tar.gz -
Subject digest:
d8f673272a2a6e075fa0983c5d1ae2928936bc72d7f39b52d23d27b00c2ea005 - Sigstore transparency entry: 709679041
- Sigstore integration time:
-
Permalink:
rica-team/rica-server@212358b8f9c489dafb574419cb6b60d7f0107859 -
Branch / Tag:
refs/tags/v0.0.1-dev.3 - Owner: https://github.com/rica-team
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yml@212358b8f9c489dafb574419cb6b60d7f0107859 -
Trigger Event:
push
-
Statement type:
File details
Details for the file rica_server-0.0.1.dev3-py3-none-any.whl.
File metadata
- Download URL: rica_server-0.0.1.dev3-py3-none-any.whl
- Upload date:
- Size: 32.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b62ea4ae6d7f7575142012f6e893335e166900b129bb47f354c3d36b235ad75e
|
|
| MD5 |
79845026ee0002c4911dcc09f741b2f5
|
|
| BLAKE2b-256 |
156343d49b964d7b123b8a265cf5519b9d279e7527481b6c9d03e2de33295750
|
Provenance
The following attestation bundles were made for rica_server-0.0.1.dev3-py3-none-any.whl:
Publisher:
pypi.yml on rica-team/rica-server
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rica_server-0.0.1.dev3-py3-none-any.whl -
Subject digest:
b62ea4ae6d7f7575142012f6e893335e166900b129bb47f354c3d36b235ad75e - Sigstore transparency entry: 709679049
- Sigstore integration time:
-
Permalink:
rica-team/rica-server@212358b8f9c489dafb574419cb6b60d7f0107859 -
Branch / Tag:
refs/tags/v0.0.1-dev.3 - Owner: https://github.com/rica-team
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yml@212358b8f9c489dafb574419cb6b60d7f0107859 -
Trigger Event:
push
-
Statement type: