Instructions to use beamcore/tools with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use beamcore/tools with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="beamcore/tools") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForMultimodalLM tokenizer = AutoTokenizer.from_pretrained("beamcore/tools") model = AutoModelForMultimodalLM.from_pretrained("beamcore/tools") 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]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use beamcore/tools with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "beamcore/tools" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "beamcore/tools", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/beamcore/tools
- SGLang
How to use beamcore/tools 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 "beamcore/tools" \ --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": "beamcore/tools", "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 "beamcore/tools" \ --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": "beamcore/tools", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use beamcore/tools with Docker Model Runner:
docker model run hf.co/beamcore/tools
🛠️ beamcore/tools
This is a highly optimized, lightweight (270M parameters) function-calling model fine-tuned on top of google/functiongemma-270m-it. It is specifically designed to run on-device (locally) as a pre-flight search and routing assistant for the Elixir-native Beamcore agent harness.
🚀 Purpose & Workflow
In agentic software engineering workflows, sending large workspace structures, complete file contents, and extensive tool schemas to massive frontier models is slow, expensive, and leads to context pollution.
beamcore/tools solves this by running locally to perform pre-flight search routing:
- Analyze Intent: When a user issues a request,
beamcore/toolsdetermines whether search/traversal tools are needed to gather codebase context. - Execute Tools: If context is missing, it emits structured tool calls (e.g.,
glob,grep,tree,read) to fetch local file structures or code. - Minimize Tokens: If no tools are required (or after search tools run and collect the necessary files), the main reasoning model is invoked with a minimal, relevant context, drastically reducing token overhead and billing.
graph TD
User([User Request]) --> Helper[beamcore/tools (Local 270M)]
Helper -->|Needs Context?| ToolCall{Tool Call?}
ToolCall -->|Yes| Exec[Execute Local Tool]
Exec --> Read[Read/Grep/Glob Result]
Read --> Main[Main Beamcore Agent]
ToolCall -->|No / Finished| Main
🛠️ Supported Tools
The model is fine-tuned to work with the following four workspace-inspection tools:
1. glob
Find workspace files matching a glob pattern relative to a path.
- Parameters:
pattern(string, required),path(string, optional),all(boolean, optional). - Example:
{"pattern": "**/*.ex"}
2. grep
Search workspace file contents by regex with optional includes.
- Parameters:
pattern(string, required),path(string, optional),include(string, optional),all(boolean, optional). - Example:
{"pattern": "defmodule", "include": "*.ex"}
3. tree
Show a compact workspace directory tree with sizes.
- Parameters:
path(string, optional). - Example:
{"path": "lib/"}
4. read
Read a workspace-relative file or directory with offset/limit parameters.
- Parameters:
filePath(string, required),offset(integer, optional),limit(integer, optional). - Example:
{"filePath": "lib/beamcore.ex", "limit": 100}
💻 Quickstart (Inference)
You can run beamcore/tools locally using transformers:
import json
from transformers import AutoTokenizer, AutoModelForCausalLM
from transformers.utils import get_json_schema
# Define tool signatures (converted to JSON Schema)
def glob(pattern: str, path: str = None, all: bool = False): pass
def grep(pattern: str, path: str = None, include: str = None, all: bool = False): pass
def tree(path: str = None): pass
def read(filePath: str, offset: int = 1, limit: int = 200): pass
tools = [
get_json_schema(glob),
get_json_schema(grep),
get_json_schema(tree),
get_json_schema(read)
]
# Load model and tokenizer
model_id = "beamcore/tools"
model = AutoModelForCausalLM.from_pretrained(model_id, device_map="auto")
tokenizer = AutoTokenizer.from_pretrained(model_id)
# System prompt
system_msg = "You are a pre-flight search assistant for a coding agent. Your ONLY job is to analyze the user request and determine if search or directory traversal tools are needed to find relevant code or files before the main coding agent answers."
messages = [
{"role": "developer", "content": system_msg},
{"role": "user", "content": "Find all Elixir source files in the project lib/ directory"}
]
# Format chat using tools
inputs = tokenizer.apply_chat_template(messages, tools=tools, return_tensors="pt").to(model.device)
outputs = model.generate(inputs, max_new_tokens=256)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
📈 Training Details
- Base Model:
google/functiongemma-270m-it - Training Method: Supervised Fine-Tuning (SFT) using TRL
- Dataset: Custom search routing examples representing diverse developer queries (directory tree traversal, pattern matching, file reads, and conversational non-search queries).
Framework Versions
- TRL: 1.5.1
- Transformers: 5.10.2
- Pytorch: 2.12.0
- Datasets: 5.0.0
- Tokenizers: 0.22.2
- Downloads last month
- 1
Model tree for beamcore/tools
Base model
google/functiongemma-270m-it