Instructions to use ABRUBAB/yinglong-intent-qwen3.5-2b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use ABRUBAB/yinglong-intent-qwen3.5-2b with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen3.5-2B") model = PeftModel.from_pretrained(base_model, "ABRUBAB/yinglong-intent-qwen3.5-2b") - Notebooks
- Google Colab
- Kaggle
yinglong-intent-qwen3.5-2b
A LoRA adapter for Qwen/Qwen3.5-2B (Apache-2.0). It reads what a person types to their AI
agent (for example "pay my rent" or "never spend more than 500 a month on food") and proposes a JSON document: either
an intent (what to do) or a mandate (the spending rules). It is the intent understanding step of YINGLONG, an AI agent
wallet that pays only inside rules the owner locked.
Important: the output is only a proposal. The model never writes an address or moves money. The YINGLONG service validates the JSON against a schema, grounds every field in the owner's own data, and the owner seals the result; the on-chain contracts then enforce it.
Base model note. adapter_config.json names Qwen/Qwen3.5-2B as the model the adapter was trained on. AutoPeftModelForCausalLM will download that base automatically.
How to use
from peft import AutoPeftModelForCausalLM
from transformers import AutoTokenizer
repo = "ABRUBAB/yinglong-intent-qwen3.5-2b"
tok = AutoTokenizer.from_pretrained(repo)
model = AutoPeftModelForCausalLM.from_pretrained(repo, device_map="auto")
msgs = [{"role": "user", "content": "Pay my rent on the first of every month, up to 900."}]
ids = tok.apply_chat_template(msgs, add_generation_prompt=True, return_tensors="pt").to(model.device)
print(tok.decode(model.generate(ids, max_new_tokens=256)[0][ids.shape[1]:], skip_special_tokens=True))
Use the same system prompt and JSON schema as the YINGLONG service (ml/intent and packages/mandate in the project
repository) to get the exact output format. Run it in non-thinking mode.
Results (held-out test split, 1255 items)
Valid JSON 99.9%, exact match 88.7% (86.8% to 90.3%), slot F1 97.9%.
| Slice | Items | Valid JSON | Exact match | Slot F1 |
|---|---|---|---|---|
| overall | 1255 | 99.9% | 88.7% | 97.9% |
| task=intent | 917 | 100.0% | 86.7% | 97.2% |
| task=mandate | 338 | 99.7% | 94.1% | 98.9% |
| language=bn | 318 | 100.0% | 80.8% | 96.1% |
| language=en | 468 | 100.0% | 95.1% | 99.0% |
| language=mixed | 283 | 99.7% | 82.3% | 97.0% |
| language=zh | 186 | 100.0% | 95.7% | 99.5% |
Training
LoRA rank 16, alpha 16, 2 epochs, learning rate 0.0002, effective batch
16, evaluation context 2048 tokens. Data: synthetic only, written by
Qwen/Qwen3-14B-AWQ; the labels were sampled by code, checked against the JSON schema and verified by a round trip
(the mandate compiler and decompiler). The training data is not published. Languages: English, Bengali, Chinese and
code-mixed.
Limits
- Exact match is lower for code-mixed text than for English; always validate and ask the owner to confirm.
- It cannot be trusted with addresses, amounts it did not read, or anything outside the schema.
- Built for a hackathon demonstration with test units and test networks; no third-party audit.
Part of YINGLONG, by team Shadow Chaser (Bangladesh), for the 2026 Shenzhen International FinTech Competition. Code and evidence: https://github.com/ABRUBAB/YINGLONG . Live demo: https://app.yinglong-agent.tech .
- Downloads last month
- 20