Instructions to use Groq/Llama-3-Groq-70B-Tool-Use with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Groq/Llama-3-Groq-70B-Tool-Use with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Groq/Llama-3-Groq-70B-Tool-Use") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Groq/Llama-3-Groq-70B-Tool-Use") model = AutoModelForCausalLM.from_pretrained("Groq/Llama-3-Groq-70B-Tool-Use") 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]:])) - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Groq/Llama-3-Groq-70B-Tool-Use with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Groq/Llama-3-Groq-70B-Tool-Use" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Groq/Llama-3-Groq-70B-Tool-Use", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Groq/Llama-3-Groq-70B-Tool-Use
- SGLang
How to use Groq/Llama-3-Groq-70B-Tool-Use 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 "Groq/Llama-3-Groq-70B-Tool-Use" \ --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": "Groq/Llama-3-Groq-70B-Tool-Use", "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 "Groq/Llama-3-Groq-70B-Tool-Use" \ --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": "Groq/Llama-3-Groq-70B-Tool-Use", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Groq/Llama-3-Groq-70B-Tool-Use with Docker Model Runner:
docker model run hf.co/Groq/Llama-3-Groq-70B-Tool-Use
[AUTOMATED] Model Memory Requirements
Model Memory Requirements
You will need about {'dtype': 'float16/bfloat16', 'Largest Layer or Residual Group': '1.96 GB', 'Total Size': '129.77 GB', 'Training using Adam (Peak vRAM)': {'model': 278683439104, 'optimizer': 557366878208, 'gradients': 418025158656, 'step': 557366878208}} VRAM to load this model for inference, and {'dtype': 'int4', 'Largest Layer or Residual Group': '501.02 MB', 'Total Size': '32.44 GB', 'Training using Adam (Peak vRAM)': {'model': -1, 'optimizer': -1, 'gradients': -1, 'step': -1}} VRAM to train it using Adam.
These calculations were measured from the Model Memory Utility Space on the Hub.
The minimum recommended vRAM needed for this model assumes using Accelerate or device_map="auto" and is denoted by the size of the "largest layer".
When performing inference, expect to add up to an additional 20% to this, as found by EleutherAI. More tests will be performed in the future to get a more accurate benchmark for each model.
When training with Adam, you can expect roughly 4x the reported results to be used. (1x for the model, 1x for the gradients, and 2x for the optimizer).
Results:
| dtype | Largest Layer or Residual Group | Total Size | Training using Adam (Peak vRAM) |
|---|---|---|---|
| float32 | 3.91 GB | 259.54 GB | {'model': 278683439104, 'optimizer': 557366878208, 'gradients': 278683439104, 'step': 1114733756416} |
| float16/bfloat16 | 1.96 GB | 129.77 GB | {'model': 278683439104, 'optimizer': 557366878208, 'gradients': 418025158656, 'step': 557366878208} |
| int8 | 1002.05 MB | 64.89 GB | {'model': -1, 'optimizer': -1, 'gradients': -1, 'step': -1} |
| int4 | 501.02 MB | 32.44 GB | {'model': -1, 'optimizer': -1, 'gradients': -1, 'step': -1} |
The model's tool-use functionality seems robust, but I've encountered inconsistencies in response times when chaining multiple tool calls within a single prompt. Have others observed similar behavior or is this expected given certain input constraints? Also, any insights on how quantization impacts tool call accuracy would be valuable for optimizing inference pipelines.
How does tool-call stability degrade under prompt length >128 tokens? Specifically, does Groq’s 70B model show increased tool-call timeout or hallucination when using tool-templates with nested JSON structures? Observed in local runs, tool-usage consistency drops sharply past 100 tokens—any data on quantization (Q4/K/M) impact on tool response latency or error rates?
How does tool-call stability behave when prompt length exceeds 1024 tokens in 4-bit quantized inference? Specifically, does tool selection degrade after ~500 tokens of context, or does it fail to resolve tool signatures at all? Any observed differences between Groq's 70B tool-use with 16-bit vs 4-bit quantization in real-time tool execution?
How does tool-call stability behave under 16GB VRAM with 4-bit quantization? Specifically, does prompt templating with dynamic tool selection trigger memory spikes during tool invocation, or does Groq’s offloading handle state transitions smoothly? Any data on latency variance between sequential tool calls and prompt reuses? Practical behavior under sustained load matters more than theoretical specs.
How does tool-call stability behave under prompt templates with >100 tokens? Specifically, does Groq’s tool-use pipeline exhibit token drift or latency spikes when chaining tools with conditional prompts? Also, what’s the actual peak memory usage (GB) when running 100 tools in sequence, under 16-bit quantization? These matter for local deployment with limited VRAM and strict latency budgets.