Text Generation
Transformers
Safetensors
English
glm4_moe
agent
tool-use
long-context
conversational
Instructions to use GAIR/LIMI-Air with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use GAIR/LIMI-Air with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="GAIR/LIMI-Air") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("GAIR/LIMI-Air") model = AutoModelForCausalLM.from_pretrained("GAIR/LIMI-Air") 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]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use GAIR/LIMI-Air with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "GAIR/LIMI-Air" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "GAIR/LIMI-Air", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/GAIR/LIMI-Air
- SGLang
How to use GAIR/LIMI-Air 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 "GAIR/LIMI-Air" \ --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": "GAIR/LIMI-Air", "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 "GAIR/LIMI-Air" \ --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": "GAIR/LIMI-Air", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use GAIR/LIMI-Air with Docker Model Runner:
docker model run hf.co/GAIR/LIMI-Air
Add files using upload-large-folder tool
Browse files- model-00000-of-00040.safetensors +3 -0
- model-00003-of-00040.safetensors +3 -0
- model-00004-of-00040.safetensors +3 -0
- model-00005-of-00040.safetensors +3 -0
- model-00006-of-00040.safetensors +3 -0
- model-00007-of-00040.safetensors +3 -0
- model-00009-of-00040.safetensors +3 -0
- model-00010-of-00040.safetensors +3 -0
- model-00011-of-00040.safetensors +3 -0
- model-00012-of-00040.safetensors +3 -0
- model-00015-of-00040.safetensors +3 -0
- model-00017-of-00040.safetensors +3 -0
- model-00018-of-00040.safetensors +3 -0
- model-00019-of-00040.safetensors +3 -0
- model-00020-of-00040.safetensors +3 -0
- model-00021-of-00040.safetensors +3 -0
- model-00023-of-00040.safetensors +3 -0
- model-00024-of-00040.safetensors +3 -0
- model-00025-of-00040.safetensors +3 -0
- model-00026-of-00040.safetensors +3 -0
- model-00027-of-00040.safetensors +3 -0
- model-00028-of-00040.safetensors +3 -0
- model-00030-of-00040.safetensors +3 -0
- model-00032-of-00040.safetensors +3 -0
- model-00033-of-00040.safetensors +3 -0
- model-00036-of-00040.safetensors +3 -0
- model-00038-of-00040.safetensors +3 -0
- tokenizer.json +3 -0
model-00000-of-00040.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0e8bc50bee3838f884fd354be8141f44e8d6bf3958e277d3d13c84186accd7dc
|
| 3 |
+
size 5365606248
|
model-00003-of-00040.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:5bbae2f2f5cd37fb86c54d88b97aa1212c6d4c69d50824050d0bcf138763ee1e
|
| 3 |
+
size 5364572592
|
model-00004-of-00040.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d8ca4f4696df33abe65a8f4f510a4115bd31399cf35f29087a90600d545b292b
|
| 3 |
+
size 5360377232
|
model-00005-of-00040.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:08dada34e97850d72753382897e4ac603325240de0a66e15df872d8923c07312
|
| 3 |
+
size 5363523976
|
model-00006-of-00040.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:2203785372755d0730736990f979e52aca38b4a18459e0c8f3bbf9a1f0fed6ff
|
| 3 |
+
size 5364572648
|
model-00007-of-00040.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:304c9c4154440a68231d2a3005cb2064731540e402da40d2aab188ca02a56a76
|
| 3 |
+
size 5363524024
|
model-00009-of-00040.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:41f8c7b75e8d1f0770d700d2db477b91871630cde6511594fdf8c7ef2d87f110
|
| 3 |
+
size 5363524432
|
model-00010-of-00040.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0048373ee55d5d69e91a0957a3efe893e0ea232ebaafd9fe56e971d6bf9a35d8
|
| 3 |
+
size 5363524448
|
model-00011-of-00040.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9a55b994402549c23f7def07f78e790055be114471ad55fa26ec171da53549f0
|
| 3 |
+
size 5364573096
|
model-00012-of-00040.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:48e7452db012b0ad64c59de3a9bc536be984b21bc190f23e32eb6dfe1074e5fe
|
| 3 |
+
size 5363524360
|
model-00015-of-00040.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b0517157eee6393a0bafcb619771873f9d556ce229ca155aaef2e02c9fa8fca3
|
| 3 |
+
size 5360377712
|
model-00017-of-00040.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9d1f75a0dbc4ef0f423ee53aa67f9cd9a56867fb050df9fa6da6131fe38ac728
|
| 3 |
+
size 5360377632
|
model-00018-of-00040.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d31937a2527dce5ab62da63d29e36574e1b58f0c6baf295e74397cfe295b18f9
|
| 3 |
+
size 5289084784
|
model-00019-of-00040.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:1823a9eb742e99ce0049df2e65dc18b637622c40c2f80483e860f434dc021346
|
| 3 |
+
size 5359818960
|
model-00020-of-00040.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:60f56a0d4863f6ce720a12c8d4dd7f71d4636c49369087f6e8fa1199b68b6b93
|
| 3 |
+
size 5363524440
|
model-00021-of-00040.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:da777c668ce35b84e6547dea60b02bff0acea2c4e353cc4faba812db0ab9bb86
|
| 3 |
+
size 5363524464
|
model-00023-of-00040.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4a8719e25d5771c2133ef68bd503d0b71dab14615c555b99652c59438151a836
|
| 3 |
+
size 5363524368
|
model-00024-of-00040.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:547521b7793d8f05df80001feb7f7e8201c1f8424c4512b17c5ff698f8a2bb28
|
| 3 |
+
size 5363524392
|
model-00025-of-00040.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:64cfc4f61f9014350d3307008db9ab318240e22266e69e905f5b72c577811dfb
|
| 3 |
+
size 5363524440
|
model-00026-of-00040.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:421d14e79e1ea2857dd813808ff8e9459b37a93a3d1ff03f1b47926c16d33b78
|
| 3 |
+
size 5364573160
|
model-00027-of-00040.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:65915c390829e814e73c963ebb8c5871dbcd92449ccc317e0931f0e89fe147e8
|
| 3 |
+
size 5363524368
|
model-00028-of-00040.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ec258c4a7c2b5e67b3030e62c9c7a028b10944426861e2a292fc45d1f3581a5e
|
| 3 |
+
size 5360377632
|
model-00030-of-00040.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c33f37ed9786737f29690419a4e375ebded7ffb04960734989e53a5a7648683d
|
| 3 |
+
size 5363524440
|
model-00032-of-00040.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e72546b40cb721932c0a2f397cb52d557a733bee1d1043e6509950fcfb36c73f
|
| 3 |
+
size 5361426304
|
model-00033-of-00040.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:453a80bb869f6df1e56386549b43c2a9015bd46f262f7cb1f61b1bbc7fc380a2
|
| 3 |
+
size 5363524368
|
model-00036-of-00040.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:61c43ac218373cbd53343de250301d350545a491617bc616b981654d75673c72
|
| 3 |
+
size 5364573160
|
model-00038-of-00040.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:93254707ec37c1fdb460aee3490f3039f32944833cee585dda83f04036eeefc3
|
| 3 |
+
size 5278804096
|
tokenizer.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9340665016419c825c4bdabbcc9acc43b7ca2c68ce142724afa829abb1be5efd
|
| 3 |
+
size 19970699
|