Instructions to use nicolasembleton/Nanbeige4.2-3B-ToolACE-n3000-ONNX with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers.js
How to use nicolasembleton/Nanbeige4.2-3B-ToolACE-n3000-ONNX with Transformers.js:
// npm i @huggingface/transformers import { pipeline } from '@huggingface/transformers'; // Allocate pipeline const pipe = await pipeline('text-generation', 'nicolasembleton/Nanbeige4.2-3B-ToolACE-n3000-ONNX'); - PEFT
How to use nicolasembleton/Nanbeige4.2-3B-ToolACE-n3000-ONNX with PEFT:
Task type is invalid.
- Notebooks
- Google Colab
- Kaggle
Upload README.md with huggingface_hub
Browse files
README.md
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: other
|
| 3 |
+
base_model: Nanbeige/Nanbeige4.2-3B
|
| 4 |
+
library_name: transformers.js
|
| 5 |
+
pipeline_tag: text-generation
|
| 6 |
+
tags:
|
| 7 |
+
- onnx
|
| 8 |
+
- lora
|
| 9 |
+
- toolace
|
| 10 |
+
- nanbeige
|
| 11 |
+
- peft
|
| 12 |
+
- webgpu
|
| 13 |
+
---
|
| 14 |
+
|
| 15 |
+
# Nanbeige4.2-3B ToolACE LoRA (n3000) — ONNX
|
| 16 |
+
|
| 17 |
+
Merged LoRA fine-tune of [`Nanbeige/Nanbeige4.2-3B`](https://huggingface.co/Nanbeige/Nanbeige4.2-3B) on
|
| 18 |
+
[Team-ACE/ToolACE](https://huggingface.co/datasets/Team-ACE/ToolACE)
|
| 19 |
+
(n3000 subset). Prefill-only ONNX with **num_loops=2 unrolled**.
|
| 20 |
+
|
| 21 |
+
## Files
|
| 22 |
+
| Path | Notes |
|
| 23 |
+
|------|-------|
|
| 24 |
+
| `onnx/model.onnx` | Graph (opset 18) |
|
| 25 |
+
| `onnx/model.onnx_data` | Consolidated FP16 weights |
|
| 26 |
+
| tokenizer / config | From base + FT |
|
| 27 |
+
|
| 28 |
+
## IO
|
| 29 |
+
- **input**: `input_ids` [batch, seq]
|
| 30 |
+
- **output**: `logits` [batch, seq, vocab]
|
| 31 |
+
- Prefill (`use_cache=False`). Looped Transformer unrolled: 44 layer calls + 2 norms.
|
| 32 |
+
|
| 33 |
+
## Validation
|
| 34 |
+
- Unrolled vs stock max abs diff: `0.000e+00`
|
| 35 |
+
- ORT vs torch max abs diff: `5.273e-02` (FP16 tol 5e-2)
|
| 36 |
+
|
| 37 |
+
## Train recipe
|
| 38 |
+
- LoRA r=16, attn+MLP (no lm_head)
|
| 39 |
+
- TRL SFTTrainer, completion_only_loss
|
| 40 |
+
- batch 1 × accum 16, seq 2048, 1 epoch, transformers 4.51
|
| 41 |
+
- Adapter: `nanbeige_toolace_r16_n3000`
|
| 42 |
+
|
| 43 |
+
## Runtime note
|
| 44 |
+
Nanbeige generation on **transformers 5.x is broken** (DynamicCache + loop KV).
|
| 45 |
+
Use **transformers==4.51.0** for HF/PyTorch inference. ONNX path is independent.
|