Run this model with HF Jobs
Run 79Labs/astraforge-8b-TCR on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/79Labs/astraforge-8b-TCR. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/79Labs/astraforge-8b-TCR on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Evaluate on a benchmark
Use HF Jobs to evaluate https://huggingface.co/79Labs/astraforge-8b-TCR. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
Quantize for lower memory use
Use HF Jobs to create a 4-bit version of https://huggingface.co/79Labs/astraforge-8b-TCR. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.
Instructions to use 79Labs/astraforge-8b-TCR with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use 79Labs/astraforge-8b-TCR with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("unsloth/Meta-Llama-3.1-8B-Instruct") model = PeftModel.from_pretrained(base_model, "79Labs/astraforge-8b-TCR") - Notebooks
- Google Colab
- Kaggle
v3.0.0: all-domain distillation arm (distill4/ck54) replaces v2.0.0 (ck2079); bfcl_all 0.829 [0.802,0.853] vs 0.556 [0.522,0.589] n=840, same session; irrelevance 0.930/0.790 vs 0.010/0.050
Browse files123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165---license: llama3.1base_model: meta-llama/Llama-3.1-8B-Instructlibrary_name: peftpipeline_tag: text-generationtags:- agentic- tool-calling- function-calling- multi-call- lora- rag- reasoninglanguage:- enmodel-index:- name: astraforge-8b-TCRresults:- task:type: text-generationname: Agentic tool-calling (first call correct)dataset:type: in-house-tool-eval-v2name: 79Labs tool eval v2, held-out real tools (n=60)metrics:- type: accuracyname: first-call accuracyvalue: 1.000- type: accuracyname: argument exact matchvalue: 0.983- task:type: text-generationname: Retrieval-augmented answeringdataset:type: in-house-ragname: 79Labs RAG eval (n=600)metrics:- type: accuracyname: row passvalue: 0.972---# astraforge-8b-TCR v2: Tool-Calling, Retrieval and Calculator Reasoning (LoRA on Llama-3.1-8B)**Developed by [79Labs](https://huggingface.co/79Labs) · Version 2.0.0 (2026-10-05)**> **This repository was replaced in place.** v1.0.0, the earlier adapter with its own model card and> benchmarks, stays available under the git tag **`v1.0.0`**:> `PeftModel.from_pretrained(base, "79Labs/astraforge-8b-TCR", revision="v1.0.0")`.> **v2 uses a different tool-call format** (see [Prompt format](#prompt-format)), so update your> parser when you upgrade.`astraforge-8b-TCR` is a LoRA adapter for **`meta-llama/Llama-3.1-8B-Instruct`**. It does three things:choosing and calling tools from a large catalogue, including **many calls in one turn**; decidingwhen to **retrieve** (`rag_search`) and answering from what came back; and **reasoning step bystep with a calculator tool**.- **Base:** Llama-3.1-8B-Instruct (context 131,072)- **Adapter:** LoRA r=16 on all attention and MLP projections, 160 MB- **Training:** 33,250 rows, 1 epoch, max length 65,536, lr 1e-4. The data is synthetic: generatedquestions over a 101-tool console catalogue (strict-grounded, so no argument the question does notstate), 20k RAG rows (5k call-only), and 5,250 reasoning rows in no-tool and calculator-tool forms.It contains no real user conversations.- **Checkpoint:** step 2,079, the final one. It was **chosen by benchmark, not by eval loss**: thetrainer's lowest eval loss was at step 100, and that checkpoint scored worse.## ResultsEvery model was prompted in its own native tool format. The Claude and DeepSeek rows were runthrough the same harness, parser and splits. Raw outputs are in [`benchmarks/`](./benchmarks).### Tool calling, eval v2 (strict-grounded, leak-free; n=60 per split)Each cell is **first-call accuracy / multi_recall**. *First-call accuracy* means the first toolnamed is the right one. *multi_recall* is the share of the reference calls the model actually made.Turns in this catalogue average about 6 calls, so read multi_recall alongside first-call accuracy.| model | seen_real | heldout_real | heldout_synth | alien_synth | args exact (heldout_real) ||---|---|---|---|---|---|| **astraforge-8b-TCR v2** | **1.000** / 0.901 | **1.000** / **0.979** | **1.000** / **0.999** | **0.983** / **0.979** | **0.983** || Claude (frontier API model) | 0.950 / 0.965 | 0.850 / 0.847 | 0.983 / 0.981 | 0.950 / 0.961 | 0.550 |- *heldout_real*: real console tools never seen in training.- *alien_synth*: synthetic tools from a different generator.- On *seen_real*, Claude makes more of the reference calls (0.965 vs 0.901). That is the onetool cell where it leads.### Retrieval (RAG eval, n=600)| model | row pass | retrieval call decision ||---|---|---|| **astraforge-8b-TCR v2** | **0.972** | 1.000 |No external model was run on this set.### Reasoning (8 quantitative families, n=160)| model | no tool | with calculator tool ||---|---|---|| **astraforge-8b-TCR v2** | 0.706 | 0.900 || Claude | 0.997 | 1.000 |**This is the adapter's weak axis.** Use the calculator path, and do not rely on unaided multi-steparithmetic. The 9B sibling family (Qwen3.5-based) reaches 0.950 / 1.000 on the same set.### Not re-measured for v2v1's `confirmed_first` (asks before acting, 0.89), elicitation and GSM8K (0.75) figures came from adifferent harness and **were not re-run on v2**, so this card claims nothing about them. If thosebehaviours matter to you, test them, or pin `v1.0.0`.## Prompt formatv2 is trained on the template in [`chat_template.jinja`](./chat_template.jinja), and **you must passit**. Llama-3.1's built-in template rejects assistant turns that carry more than one tool call, andthis model makes several per turn. Tool calls come out as XML:```<atem:function_calls><atem:invoke name="get_quote"><atem:parameter name="symbol">NSE:RELIANCE</atem:parameter></atem:invoke><atem:invoke name="get_news"><atem:parameter name="query">Reliance Industries</atem:parameter></atem:invoke></atem:function_calls>```Parse the `invoke` blocks and coerce each parameter to its schema type.## Usage```pythonfrom transformers import AutoTokenizer, AutoModelForCausalLMfrom peft import PeftModelimport torchbase = "meta-llama/Llama-3.1-8B-Instruct"tok = AutoTokenizer.from_pretrained("79Labs/astraforge-8b-TCR") # loads chat_template.jinja (the ATEM template)model = AutoModelForCausalLM.from_pretrained(base, torch_dtype=torch.bfloat16, device_map="auto")model = PeftModel.from_pretrained(model, "79Labs/astraforge-8b-TCR")messages = [{"role": "user", "content": "Price and latest news for Reliance?"}]tools = [...] # OpenAI-style JSON schemasids = tok.apply_chat_template(messages, tools=tools, add_generation_prompt=True, return_tensors="pt").to(model.device)out = model.generate(ids, max_new_tokens=512, do_sample=False)print(tok.decode(out[0, ids.shape[1]:], skip_special_tokens=False))```## Limitations- Reasoning without a tool is weak (0.706). Route arithmetic through a calculator tool.- The tool benchmarks use one product's catalogue, a financial-markets console. Expect weaker results oncatalogues that look very different, and evaluate on your own tools.- With 1,000+ tools the catalogue will not fit in one prompt: 1,000 full schemas come to about 145ktokens against a 131k context. Shortlist with a retriever first.- English only. Not financial advice.## Versions| version | date | notes ||---|---|---|| 2.0.0 | 2026-10-05 | multi-call ATEM format, RAG, calculator reasoning; benchmarked against Claude on the same harness || 1.0.0 | earlier | tag `v1.0.0`: single-call agentic adapter with elicitation and confirm-first evaluations |12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273---base_model: unsloth/Meta-Llama-3.1-8B-Instructlibrary_name: peftpipeline_tag: text-generationtags:- base_model:adapter:unsloth/Meta-Llama-3.1-8B-Instruct- lora- function-calling- tool-uselicense: apache-2.0---# astraforge-8b-TCR — v3.0.0A LoRA (r=16, alpha=32) on `unsloth/Meta-Llama-3.1-8B-Instruct` that emits toolcalls in the **ATEM** XML surface (`<atem:function_calls>` / `<atem:invokename=...>` / `<atem:parameter name=...>`), including multi-call and parallelturns, and answers without calling when no tool fits.This release replaces **v2.0.0** (`astraforge-v4/checkpoint-2079`) with theall-domain distillation arm `astraforge-distill4/checkpoint-54`.## Evaluation — head-to-head, same splits, same serving sessionBoth adapters were served in one vLLM session on the same base and scored on theidentical BFCL-v4-derived splits (`n=840`), so the comparison is apples toapples. Full JSON for both runs is in `benchmarks/`.| split | n | v3.0.0 (this) | v2.0.0 (ck2079) ||---|---|---|---|| bfcl_simple | 100 | 0.940 | 0.860 || bfcl_multiple | 100 | 0.900 | 0.850 || bfcl_parallel | 100 | 0.850 | 0.750 || bfcl_parallel_multiple | 100 | 0.850 | 0.730 || bfcl_live_simple | 100 | 0.690 | 0.660 || bfcl_live_multiple | 100 | 0.750 | 0.600 || bfcl_live_parallel | 16 | 0.688 | 0.312 || bfcl_live_parallel_multiple | 24 | 0.625 | 0.458 || bfcl_irrelevance | 100 | 0.930 | 0.010 || bfcl_live_irrelevance | 100 | 0.790 | 0.050 || multi_domain | 100 | 0.730 | 0.740 || unseen_family | 100 | 1.000 | 1.000 || **bfcl_all** | **840** | **0.829 [0.802, 0.853]** | **0.556 [0.522, 0.589]** |**The decisive change is the irrelevance heads.** v2.0.0 made a tool call onessentially every row where the correct behaviour is to call nothing(`bfcl_irrelevance` 0.010, `bfcl_live_irrelevance` 0.050); v3.0.0 abstains on0.930 / 0.790. The two 95% CIs on `bfcl_all` do not overlap.**Where it still stands.** Against the DeepSeek-V4.1-Flash teacher on the samesplits — 0.857 [0.832, 0.879] — v3.0.0 is 0.028 below and the CIs overlap, sothis is not a claim of parity.## Training- Distillation from a local DeepSeek-V4.1-Flash teacher: the teacher is given thesame system prompt and offered catalogue and produces up to 3 tool-callingrounds, each fed the real recorded tool result, then a written answer.- Base `unsloth/Meta-Llama-3.1-8B-Instruct`; LoRA r=16, alpha=32 on all sevenprojection modules; LR 5e-6.- Corpus: `corpus_distill_astra_frozen1` (419 rows) — this line is corpus-bound,not step-bound; checkpoint 25/50/54 sit within noise of one another.## UseLoad the base with the ATEM chat template(`train/templates/llama31_atem.jinja`) and this adapter on top. The adapterconfig's `base_model_name_or_path` is `unsloth/Meta-Llama-3.1-8B-Instruct`.## ProvenanceAdapter and benchmark JSONs are byte-identical to the local artifacts; thesafetensors LFS sha256 was verified against the local file after upload.
README.md+67-159