Text Generation
Transformers
Safetensors
GGUF
English
qwen2
code
chat
qwen
qwen-coder
agent
robotics
conversational
text-generation-inference
Instructions to use driaforall/Tiny-Agent-a-3B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use driaforall/Tiny-Agent-a-3B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="driaforall/Tiny-Agent-a-3B") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("driaforall/Tiny-Agent-a-3B") model = AutoModelForCausalLM.from_pretrained("driaforall/Tiny-Agent-a-3B") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - llama-cpp-python
How to use driaforall/Tiny-Agent-a-3B with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="driaforall/Tiny-Agent-a-3B", filename="dria-agent-a-3b.Q4_K_M.gguf", )
llm.create_chat_completion( messages = [ { "role": "user", "content": "What is the capital of France?" } ] ) - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use driaforall/Tiny-Agent-a-3B with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf driaforall/Tiny-Agent-a-3B:Q4_K_M # Run inference directly in the terminal: llama-cli -hf driaforall/Tiny-Agent-a-3B:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf driaforall/Tiny-Agent-a-3B:Q4_K_M # Run inference directly in the terminal: llama-cli -hf driaforall/Tiny-Agent-a-3B:Q4_K_M
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 driaforall/Tiny-Agent-a-3B:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf driaforall/Tiny-Agent-a-3B:Q4_K_M
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 driaforall/Tiny-Agent-a-3B:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf driaforall/Tiny-Agent-a-3B:Q4_K_M
Use Docker
docker model run hf.co/driaforall/Tiny-Agent-a-3B:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use driaforall/Tiny-Agent-a-3B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "driaforall/Tiny-Agent-a-3B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "driaforall/Tiny-Agent-a-3B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/driaforall/Tiny-Agent-a-3B:Q4_K_M
- SGLang
How to use driaforall/Tiny-Agent-a-3B with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "driaforall/Tiny-Agent-a-3B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "driaforall/Tiny-Agent-a-3B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "driaforall/Tiny-Agent-a-3B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "driaforall/Tiny-Agent-a-3B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use driaforall/Tiny-Agent-a-3B with Ollama:
ollama run hf.co/driaforall/Tiny-Agent-a-3B:Q4_K_M
- Unsloth Studio
How to use driaforall/Tiny-Agent-a-3B 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 driaforall/Tiny-Agent-a-3B 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 driaforall/Tiny-Agent-a-3B to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for driaforall/Tiny-Agent-a-3B to start chatting
- Pi
How to use driaforall/Tiny-Agent-a-3B with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf driaforall/Tiny-Agent-a-3B:Q4_K_M
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "driaforall/Tiny-Agent-a-3B:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use driaforall/Tiny-Agent-a-3B with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf driaforall/Tiny-Agent-a-3B:Q4_K_M
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default driaforall/Tiny-Agent-a-3B:Q4_K_M
Run Hermes
hermes
- Docker Model Runner
How to use driaforall/Tiny-Agent-a-3B with Docker Model Runner:
docker model run hf.co/driaforall/Tiny-Agent-a-3B:Q4_K_M
- Lemonade
How to use driaforall/Tiny-Agent-a-3B with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull driaforall/Tiny-Agent-a-3B:Q4_K_M
Run and chat with the model
lemonade run user.Tiny-Agent-a-3B-Q4_K_M
List all available models
lemonade list
Improve model card: Add paper abstract and code link; update pipeline tag
#2
by nielsr HF Staff - opened
README.md
CHANGED
|
@@ -7,7 +7,7 @@ library_name: transformers
|
|
| 7 |
license: other
|
| 8 |
license_name: qwen-research
|
| 9 |
license_link: https://huggingface.co/Qwen/Qwen2.5-Coder-3B-Instruct/blob/main/LICENSE
|
| 10 |
-
pipeline_tag:
|
| 11 |
tags:
|
| 12 |
- code
|
| 13 |
- chat
|
|
@@ -19,6 +19,12 @@ tags:
|
|
| 19 |
|
| 20 |
***Tiny-Agent-α*** is an extension of Dria-Agent-a, trained on top of the [Qwen2.5-Coder](https://huggingface.co/collections/Qwen/qwen25-coder-66eaa22e6f99801bf65b0c2f) series to be used in edge devices. These models are carefully fine tuned with quantization aware training to minimize performance degradation after quantization.
|
| 21 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 22 |
Tiny-Agent-α employs ***Pythonic function calling***, which is LLMs using blocks of Python code to interact with provided tools and output actions. This method was inspired by many previous work, including but not limited to [DynaSaur](https://arxiv.org/pdf/2411.01747), [RLEF](https://arxiv.org/pdf/2410.02089), [ADAS](https://arxiv.org/pdf/2408.08435) and [CAMEL](https://arxiv.org/pdf/2303.17760). This way of function calling has a few advantages over traditional JSON-based function calling methods:
|
| 23 |
|
| 24 |
1. **One-shot Parallel Multiple Function Calls:** The model can can utilise many synchronous processes in one chat turn to arrive to a solution, which would require other function calling models multiple turns of conversation.
|
|
|
|
| 7 |
license: other
|
| 8 |
license_name: qwen-research
|
| 9 |
license_link: https://huggingface.co/Qwen/Qwen2.5-Coder-3B-Instruct/blob/main/LICENSE
|
| 10 |
+
pipeline_tag: text-generation
|
| 11 |
tags:
|
| 12 |
- code
|
| 13 |
- chat
|
|
|
|
| 19 |
|
| 20 |
***Tiny-Agent-α*** is an extension of Dria-Agent-a, trained on top of the [Qwen2.5-Coder](https://huggingface.co/collections/Qwen/qwen25-coder-66eaa22e6f99801bf65b0c2f) series to be used in edge devices. These models are carefully fine tuned with quantization aware training to minimize performance degradation after quantization.
|
| 21 |
|
| 22 |
+
**DynaSaur GitHub repository:** https://github.com/adobe-research/dynasaur
|
| 23 |
+
|
| 24 |
+
**Paper abstract:**
|
| 25 |
+
|
| 26 |
+
Existing LLM agent systems typically select actions from a fixed and predefined set at every step. While this approach is effective in closed, narrowly scoped environments, it presents two major challenges for real-world, open-ended scenarios: (1) it significantly restricts the planning and acting capabilities of LLM agents, and (2) it requires substantial human effort to enumerate and implement all possible actions, which is impractical in complex environments with a vast number of potential actions. To address these limitations, we propose an LLM agent framework that can dynamically create and compose actions as needed. In this framework, the agent interacts with its environment by generating and executing programs written in a general-purpose programming language. Moreover, generated actions are accumulated over time for future reuse. Our extensive experiments across multiple benchmarks show that this framework significantly improves flexibility and outperforms prior methods that rely on a fixed action set. Notably, it enables LLM agents to adapt and recover in scenarios where predefined actions are insufficient or fail due to unforeseen edge cases. Our code can be found in this https URL .
|
| 27 |
+
|
| 28 |
Tiny-Agent-α employs ***Pythonic function calling***, which is LLMs using blocks of Python code to interact with provided tools and output actions. This method was inspired by many previous work, including but not limited to [DynaSaur](https://arxiv.org/pdf/2411.01747), [RLEF](https://arxiv.org/pdf/2410.02089), [ADAS](https://arxiv.org/pdf/2408.08435) and [CAMEL](https://arxiv.org/pdf/2303.17760). This way of function calling has a few advantages over traditional JSON-based function calling methods:
|
| 29 |
|
| 30 |
1. **One-shot Parallel Multiple Function Calls:** The model can can utilise many synchronous processes in one chat turn to arrive to a solution, which would require other function calling models multiple turns of conversation.
|