Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/maxmekiska/llmnet
A library designed to harness diversity of thought by combining multiple LLMs.
https://github.com/maxmekiska/llmnet
consensus diversity llm network thought
Last synced: 26 days ago
JSON representation
A library designed to harness diversity of thought by combining multiple LLMs.
- Host: GitHub
- URL: https://github.com/maxmekiska/llmnet
- Owner: maxmekiska
- License: mit
- Created: 2023-07-12T19:28:02.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-02-01T00:54:43.000Z (10 months ago)
- Last Synced: 2024-10-09T12:57:38.621Z (about 1 month ago)
- Topics: consensus, diversity, llm, network, thought
- Language: Python
- Homepage:
- Size: 744 KB
- Stars: 6
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# `llmnet`
llmnet is a library designed to facilitate collaborative work among LLMs on diverse tasks. Its primary goal is to encourage a diversity of thought across various LLM models.
llmnet comprises two main components:
1. LLM network workers
2. Consensus workerThe LLM network workers can independently and concurrently process tasks, while the consensus worker can access the various solutions and generate a final output. It's important to note that the consensus worker is optional and doesn't necessarily need to be employed.
## Example
### Prerequisite
llmnet currently supports LLM models from OpenAI and Google. The user can define the model to be used for the LLM workers, as well as the model to be used for the consensus worker.
Please make sure to set env variables called `OPENAI_API_KEY`, `GOOGLE_API_KEY` to your OpenAi and Google keys.
### How to use llmnet?
#### llm worker
You have currently three llm worker at your disposal:
1. openaillmbot
2. googlellmbot
3. randomllmbot
4. randomopenaillmbot
5. randomgooglellmbot##### `openaillmbot`
Interface with OpenAi models.
optional parameters:
```
model (str) = 'gpt-3.5-turbo'
max_tokens (int) = 2024
temperature (float) = 0.1
n (int) = 1
stop (Union[str, List[str]]) = None
```##### `googlellmbot`
Interface with Google models.
optional parameters:
```
model (str) = 'gemini-pro'
max_output_tokens (int) = 2024
temperature (float) = 0.1
top_p (float) = None
top_k (int) = None
candidate_count (int) = 1
stop_sequences (str) = None
```##### `randomllmbot`
Select randomly between all available llmworkers and parameter specified.
optional parameters:
```
random_configuration (Dict) = {}
```example dict:
```
{
"":
{
"": [],
"": [],
...
},
"":
{
"": [],
"": []
...
}
...
}
```##### `randomopenaillmbot`
Select randomly between all configurations possible for OpenAi based llms.
optional parameters - if not provided, defaults to `openaillmbot` default values:
```
random_configuration (Dict) = {}
```example dict:
```
{
"": [],
"": [],
...
}
```##### `randomgooglellmbot`
Select randomly between all configurations possible for Google based llms.
optional parameters - if not provided, defaults to `googlellmbot` default values:
```
random_configuration (Dict) = {}
```example dict:
```
{
"": [": [