Instructions to use squeeze-ai-lab/TinyAgent-1.1B-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use squeeze-ai-lab/TinyAgent-1.1B-GGUF with Transformers:
# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("squeeze-ai-lab/TinyAgent-1.1B-GGUF", dtype="auto") - llama-cpp-python
How to use squeeze-ai-lab/TinyAgent-1.1B-GGUF with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="squeeze-ai-lab/TinyAgent-1.1B-GGUF", filename="TinyAgent-1.1B-F16.gguf", )
llm.create_chat_completion( messages = "No input example has been defined for this model task." )
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use squeeze-ai-lab/TinyAgent-1.1B-GGUF with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf squeeze-ai-lab/TinyAgent-1.1B-GGUF:F16 # Run inference directly in the terminal: llama cli -hf squeeze-ai-lab/TinyAgent-1.1B-GGUF:F16
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf squeeze-ai-lab/TinyAgent-1.1B-GGUF:F16 # Run inference directly in the terminal: llama cli -hf squeeze-ai-lab/TinyAgent-1.1B-GGUF:F16
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf squeeze-ai-lab/TinyAgent-1.1B-GGUF:F16 # Run inference directly in the terminal: ./llama-cli -hf squeeze-ai-lab/TinyAgent-1.1B-GGUF:F16
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf squeeze-ai-lab/TinyAgent-1.1B-GGUF:F16 # Run inference directly in the terminal: ./build/bin/llama-cli -hf squeeze-ai-lab/TinyAgent-1.1B-GGUF:F16
Use Docker
docker model run hf.co/squeeze-ai-lab/TinyAgent-1.1B-GGUF:F16
- LM Studio
- Jan
- Ollama
How to use squeeze-ai-lab/TinyAgent-1.1B-GGUF with Ollama:
ollama run hf.co/squeeze-ai-lab/TinyAgent-1.1B-GGUF:F16
- Unsloth Studio
How to use squeeze-ai-lab/TinyAgent-1.1B-GGUF with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for squeeze-ai-lab/TinyAgent-1.1B-GGUF to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for squeeze-ai-lab/TinyAgent-1.1B-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for squeeze-ai-lab/TinyAgent-1.1B-GGUF to start chatting
- Atomic Chat new
- Docker Model Runner
How to use squeeze-ai-lab/TinyAgent-1.1B-GGUF with Docker Model Runner:
docker model run hf.co/squeeze-ai-lab/TinyAgent-1.1B-GGUF:F16
- Lemonade
How to use squeeze-ai-lab/TinyAgent-1.1B-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull squeeze-ai-lab/TinyAgent-1.1B-GGUF:F16
Run and chat with the model
lemonade run user.TinyAgent-1.1B-GGUF-F16
List all available models
lemonade list
Update README.md
Browse files
README.md
CHANGED
|
@@ -44,7 +44,7 @@ Please see our [Github](https://github.com/SqueezeAILab/TinyAgent) for details o
|
|
| 44 |
## Training Details
|
| 45 |
|
| 46 |
**Dataset:**
|
| 47 |
-
We curated a [dataset](https://huggingface.co/datasets/squeeze-ai-lab/TinyAgent-dataset) of **40,000** real-life use cases. We use GPT-3.5-Turbo to generate real-world instructions. These are then used to obtain synthetic execution plans using GPT-4-Turbo. Please check out our blog post for more details on our dataset.
|
| 48 |
|
| 49 |
**Fine-tuning Procedure:**
|
| 50 |
TinyAgent models are fine-tuned from base models. Below is a table of each TinyAgent model with its base counterpart
|
|
@@ -57,14 +57,14 @@ TinyAgent models are fine-tuned from base models. Below is a table of each TinyA
|
|
| 57 |
| TinyAgent-1.1B + ToolRAG / [[hf](https://huggingface.co/squeeze-ai-lab/TinyAgent-1.1B)] [[gguf](https://huggingface.co/squeeze-ai-lab/TinyAgent-1.1B-GGUF)] | **80.06%** |
|
| 58 |
| TinyAgent-7B + ToolRAG / [[hf](https://huggingface.co/squeeze-ai-lab/TinyAgent-7B)] [[gguf](https://huggingface.co/squeeze-ai-lab/TinyAgent-7B-GGUF)] | **84.95%** |
|
| 59 |
|
| 60 |
-
Using the synthetic data generation process described above, we use parameter-efficient fine-tuning with LoRA to fine-tune the base models for 3 epochs. Please check out our blog post for more details on our fine-tuning procedure.
|
| 61 |
|
| 62 |
### 🛠️ ToolRAG
|
| 63 |
|
| 64 |
-
When faced with challenging tasks, SLM agents require appropriate tools and in-context examples to guide them. If the model sees irrelevant examples, it can hallucinate. Likewise, if the model sees the descriptions of the tools that it doesn’t need, it usually gets confused, and these tools take up unnecessary prompt space. To tackle this, TinyAgent uses ToolRAG to retrieve the best tools and examples suited for a given query. This process has minimal latency and increases the accuracy of TinyAgent substantially. Please take a look at our blog post and our [ToolRAG model](https://huggingface.co/squeeze-ai-lab/TinyAgent-ToolRAG) for more details.
|
| 65 |
|
| 66 |
|
| 67 |
## Links
|
| 68 |
-
**Blog Post**:
|
| 69 |
|
| 70 |
**Github:** https://github.com/SqueezeAILab/TinyAgent
|
|
|
|
| 44 |
## Training Details
|
| 45 |
|
| 46 |
**Dataset:**
|
| 47 |
+
We curated a [dataset](https://huggingface.co/datasets/squeeze-ai-lab/TinyAgent-dataset) of **40,000** real-life use cases. We use GPT-3.5-Turbo to generate real-world instructions. These are then used to obtain synthetic execution plans using GPT-4-Turbo. Please check out our [blog post](https://bair.berkeley.edu/blog/2024/05/29/tiny-agent/) for more details on our dataset.
|
| 48 |
|
| 49 |
**Fine-tuning Procedure:**
|
| 50 |
TinyAgent models are fine-tuned from base models. Below is a table of each TinyAgent model with its base counterpart
|
|
|
|
| 57 |
| TinyAgent-1.1B + ToolRAG / [[hf](https://huggingface.co/squeeze-ai-lab/TinyAgent-1.1B)] [[gguf](https://huggingface.co/squeeze-ai-lab/TinyAgent-1.1B-GGUF)] | **80.06%** |
|
| 58 |
| TinyAgent-7B + ToolRAG / [[hf](https://huggingface.co/squeeze-ai-lab/TinyAgent-7B)] [[gguf](https://huggingface.co/squeeze-ai-lab/TinyAgent-7B-GGUF)] | **84.95%** |
|
| 59 |
|
| 60 |
+
Using the synthetic data generation process described above, we use parameter-efficient fine-tuning with LoRA to fine-tune the base models for 3 epochs. Please check out our [blog post](https://bair.berkeley.edu/blog/2024/05/29/tiny-agent/) for more details on our fine-tuning procedure.
|
| 61 |
|
| 62 |
### 🛠️ ToolRAG
|
| 63 |
|
| 64 |
+
When faced with challenging tasks, SLM agents require appropriate tools and in-context examples to guide them. If the model sees irrelevant examples, it can hallucinate. Likewise, if the model sees the descriptions of the tools that it doesn’t need, it usually gets confused, and these tools take up unnecessary prompt space. To tackle this, TinyAgent uses ToolRAG to retrieve the best tools and examples suited for a given query. This process has minimal latency and increases the accuracy of TinyAgent substantially. Please take a look at our [blog post](https://bair.berkeley.edu/blog/2024/05/29/tiny-agent/) and our [ToolRAG model](https://huggingface.co/squeeze-ai-lab/TinyAgent-ToolRAG) for more details.
|
| 65 |
|
| 66 |
|
| 67 |
## Links
|
| 68 |
+
**Blog Post**: https://bair.berkeley.edu/blog/2024/05/29/tiny-agent/
|
| 69 |
|
| 70 |
**Github:** https://github.com/SqueezeAILab/TinyAgent
|