Agentic Workflow with Quantized LLMs
Project description
Quant_AgentTools
🚀 Revolutionize your workflow with AgentTools! 🤖💼
AgentTools introduces the power of quantized models, enabling seamless local CPU execution for lightning-fast processing. 🌐⚡
💡 Key Advantages:
- Utilize quantized models for efficient local execution.
- Experience accelerated performance on CPU setups.
- Craft a responsive and dynamic workflow with ease.
- Combine the flexibility of custom functions with the speed of quantized models.
- Unlock unparalleled efficiency in your AI-driven tasks! 🚀🔍
Motivation
My motivation to create this library was to have access to Agentic Workflow which has been well developed for OpenAI Models, but not for Open Source Quantized models that work on cpu and can leverage multi-threading. A big thanks to GPT4All for making this possible.
Install the Library
pip install Quant-AgentTools
Using the AgentTools Class
To use the AgentTools
class from the Quant_AgentTools
library, follow the steps below:
Importing the Class
First, import the AgentTools
class from the Quant_AgentTools.agent_tools
module:
from Quant_AgentTools.agent_tools import AgentTools
Creating an Instance
Next, create an instance of the AgentTools class. You can optionally pass a model or model name to the constructor:
agent = AgentTools(model=my_model)
#or
agent = AgentTools(model_name = "mistral-7b-instruct-v0.1.Q4_0.gguf")
Chat
Chat with your newly created Agent, make sure to at least initialize the model, by passing a model or model_name in AgentTools
class. You can access the list of models here. Models.
agent.chat(query='What is the theory of relativity?')
Add Tools
Add Tools that the Model can access, the tools can be user-defined python functions, also do add their description and usage so that the models can understand them better.
def mul(a,b):
try:
return a*b
except:
return None
def div(a,b):
try:
return a/b
except:
return None
agent.add_tool('multiply', mul, "Multiplies two numbers", "multiply(a,b)")
agent.add_tool('division', div, "Divides two numbers", "division(a,b)")
result = agent.chat('What is 89 times 44?')
print(result)
3916
Contributing
Feel free to Contribute further by forking the repository and submitting pull requests or submitting issues. Github
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
File details
Details for the file Quant_AgentTools-0.3.1.tar.gz
.
File metadata
- Download URL: Quant_AgentTools-0.3.1.tar.gz
- Upload date:
- Size: 5.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 78b2f9a036213889534b8f248e66e627d6502a14282cc838ac4531e9125c3a57 |
|
MD5 | 38e7f4915c8e46cbc165cfd4f925af61 |
|
BLAKE2b-256 | aedf7d8b7d8fa67a8173dcfb18c1e1c2dfba9310a37e4f7e9c7ba45cc36adadd |
File details
Details for the file Quant_AgentTools-0.3.1-py3-none-any.whl
.
File metadata
- Download URL: Quant_AgentTools-0.3.1-py3-none-any.whl
- Upload date:
- Size: 6.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 50fde922c94cd571e47bf0f660f4548723874e1d553da8e8652363d352103d29 |
|
MD5 | d5808ca3048a463c4f49dd7b7a222074 |
|
BLAKE2b-256 | 508d4a9f2b54f622bdc8c08329afc840d42cc221df3eafd278a9921132c0288b |