mhjiang0408 commited on
Commit
0fcce4c
·
verified ·
1 Parent(s): 5fd3646

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +150 -3
README.md CHANGED
@@ -1,3 +1,150 @@
1
- ---
2
- license: apache-2.0
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ tags:
3
+ - text-generation
4
+ - agent
5
+ - tool-use
6
+ - long-context
7
+ license: other
8
+ language:
9
+ - en
10
+ pipeline_tag: text-generation
11
+ ---
12
+
13
+ # LIMI: Less is More for Agency
14
+
15
+ ## 📌 Table of Contents
16
+ - [Overview](#overview)
17
+ - [Model Details](#model-details)
18
+ - [Dataset](#dataset)
19
+ - [Quick Start](#quick-start)
20
+ - [Prompting](#prompting)
21
+ - [Evaluation](#evaluation)
22
+ - [Limitations](#limitations)
23
+ - [License](#license)
24
+ - [Citation](#citation)
25
+
26
+ ## Overview
27
+
28
+ LIMI is an agentic model fine‑tuned from GLM‑4.5 (355B) using compact, high‑quality data to emphasize:
29
+
30
+ - Targeted capabilities: tool use, multi‑turn correction, spec compliance
31
+ - Long‑context reasoning with tokenizer‑filtered samples (≤128k tokens)
32
+ - OpenAI‑style `messages` with optional function/tool calls
33
+
34
+ ## Model Details
35
+
36
+ - Base model: `zai-org/GLM-4.5`
37
+ - Context: up to 128k tokens (training budget)
38
+ - Training framework: slime
39
+ - Training data: curated conversations from [GAIR/limi](https://huggingface.co/datasets/GAIR/limi)
40
+
41
+ ## Key Results
42
+
43
+ | Model | Agency Bench FTFC | Agency Bench SR | Agency Bench RC | Training Samples |
44
+ |-------|--------|---------|---------|-----------------|
45
+ | LIMI (Ours) | **71.7** | **74.2** |**74.6**| 78 |
46
+ | GLM-4.5 | 37.8 | 50.0 | 47.4 | 100k+ |
47
+
48
+ ## Model Zoo
49
+
50
+ Our LIMO model is available on Hugging Face 🤗:
51
+
52
+ | Model | Backbone | Size | Link |
53
+ |---|---|---|---|
54
+ | LIMI | [GLM‑4.5](https://huggingface.co/zai-org/GLM-4.5) | 355B | https://huggingface.co/GAIR/LIMI |
55
+ | LIMI‑Air | [GLM‑4.5‑Air](https://huggingface.co/zai-org/GLM-4.5-Air) | 106B | https://huggingface.co/GAIR/LIMI-Air |
56
+
57
+
58
+ ## Datasets
59
+
60
+ We release our datasets through Hugging Face 🤗:
61
+ - Name: `GAIR/LIMI`
62
+ - Summary: curated agentic SFT data (OpenAI `messages`, optional `tools`, normalized tool‑call arguments), filtered by tokenizer to ≤128k tokens; current release contains ~78 high‑quality samples.
63
+ - Link: https://huggingface.co/datasets/GAIR/LIMI
64
+
65
+ ## Quick Start
66
+
67
+ <details>
68
+ <summary>Start with HF Transformers</summary>
69
+
70
+ ```python
71
+ from transformers import AutoModelForCausalLM, AutoTokenizer
72
+ import torch
73
+
74
+ model = AutoModelForCausalLM.from_pretrained(
75
+ "GAIR/LIMI", torch_dtype="auto", device_map="auto", trust_remote_code=True
76
+ )
77
+ tok = AutoTokenizer.from_pretrained("GAIR/LIMI", trust_remote_code=True)
78
+
79
+ messages = [
80
+ {"role": "system", "content": "You are a helpful assistant tasked with discovering mathematical function structures for scientific systems."},
81
+ {"role": "user", "content": "Modify the equation.py function, considering the physical meaning and relationships of the inputs."}
82
+ ]
83
+
84
+ text = tok.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
85
+ inputs = tok(text, return_tensors="pt").to(model.device)
86
+ out = model.generate(
87
+ **inputs,
88
+ max_new_tokens=4096,
89
+ temperature=0.6,
90
+ top_p=0.95,
91
+ do_sample=True,
92
+ )
93
+ print(tok.decode(out[0][inputs['input_ids'].shape[1]:], skip_special_tokens=True))
94
+ ```
95
+
96
+ </details>
97
+
98
+ <details>
99
+ <summary>Start with VLLM</summary>
100
+
101
+ ```python
102
+ from vllm import LLM, SamplingParams
103
+ from transformers import AutoTokenizer
104
+
105
+ llm = LLM(model="GAIR/LIMI", trust_remote_code=True)
106
+ tok = AutoTokenizer.from_pretrained("GAIR/LIMI", trust_remote_code=True)
107
+ text = tok.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
108
+ out = llm.generate(text, SamplingParams(temperature=0.6, max_tokens=4096, top_p=0.95))
109
+ print(out[0].outputs[0].text)
110
+ ```
111
+
112
+ </details>
113
+
114
+ ## Prompting
115
+
116
+ - Messages follow OpenAI chat format; include a grounding system message when helpful.
117
+ - Example:
118
+
119
+ ```json
120
+ [
121
+ {"role": "system", "content": "You are a helpful assistant tasked with discovering mathematical function structures for scientific systems."},
122
+ {"role": "user", "content": "Modify the equation.py function, considering the physical meaning and relationships of the inputs."}
123
+ ]
124
+ ```
125
+
126
+ ## Evaluation
127
+
128
+ - We report FTFC (First‑Turn Functional Completeness), SR@R (Success Rate at R), and RC@R (Remaining Chances at R) with R=3.
129
+ - See the paper for experimental protocol and scores.
130
+
131
+ ## Limitations
132
+
133
+ - May produce incorrect tool arguments or overfit to frequent schemas
134
+ - Not safety‑filtered for sensitive domains; use with guardrails and oversight
135
+
136
+ ## License
137
+
138
+ - Inherits base model (GLM‑4.5) terms; verify upstream license before deployment
139
+
140
+ ## Citation
141
+
142
+ ```bibtex
143
+ @article{LIMI2025,
144
+ title = {Less is More for Agentic Intelligence},
145
+ author = {LIMI Authors},
146
+ year = {2025},
147
+ journal = {arXiv preprint arXiv:2502.03387}
148
+ }
149
+ ```
150
+