Text Generation
Transformers
Safetensors
English
glm4_moe
agent
tool-use
long-context
conversational
Instructions to use GAIR/LIMI with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use GAIR/LIMI with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="GAIR/LIMI") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("GAIR/LIMI") model = AutoModelForCausalLM.from_pretrained("GAIR/LIMI") 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 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "GAIR/LIMI" # 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", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/GAIR/LIMI
- SGLang
How to use GAIR/LIMI 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" \ --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", "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" \ --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", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use GAIR/LIMI with Docker Model Runner:
docker model run hf.co/GAIR/LIMI
Add files using upload-large-folder tool
Browse files- generation_config.json +10 -0
- model-00000-of-00132.safetensors +3 -0
- model-00006-of-00132.safetensors +3 -0
- model-00011-of-00132.safetensors +3 -0
- model-00023-of-00132.safetensors +3 -0
- model-00025-of-00132.safetensors +3 -0
- model-00027-of-00132.safetensors +3 -0
- model-00035-of-00132.safetensors +3 -0
- model-00040-of-00132.safetensors +3 -0
- model-00056-of-00132.safetensors +3 -0
- model-00059-of-00132.safetensors +3 -0
- model-00060-of-00132.safetensors +3 -0
- model-00086-of-00132.safetensors +3 -0
- model-00090-of-00132.safetensors +3 -0
- model-00100-of-00132.safetensors +3 -0
- model-00111-of-00132.safetensors +3 -0
- model-00117-of-00132.safetensors +3 -0
- model-00127-of-00132.safetensors +3 -0
- tokenizer.json +3 -0
generation_config.json
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_from_model_config": true,
|
| 3 |
+
"eos_token_id": [
|
| 4 |
+
151329,
|
| 5 |
+
151336,
|
| 6 |
+
151338
|
| 7 |
+
],
|
| 8 |
+
"pad_token_id": 151329,
|
| 9 |
+
"transformers_version": "4.54.0"
|
| 10 |
+
}
|
model-00000-of-00132.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d88229a6b90a56738069cea431ed1967a6f93c5d56f30dae467c9f210ad57c9f
|
| 3 |
+
size 5358375840
|
model-00006-of-00132.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:2518fd9690d2d2a99d32b3208ba28295f552318cd549b0b72c0b6358e0762d52
|
| 3 |
+
size 5363548312
|
model-00011-of-00132.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c9f20b87ac7d3b68d406fa73b75f98f59cd4e2b94f22e03eac95ecf6d284d05c
|
| 3 |
+
size 5363509064
|
model-00023-of-00132.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:acd8c2ffe5c8f320e835f77c8ae69ea8760d7f89db0103f5a975fc9ad145fcdf
|
| 3 |
+
size 5353033000
|
model-00025-of-00132.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7389c496f0fd93cd0f4d21c5d7d296f23e899ff066bf34a5a700d76b1c9f0652
|
| 3 |
+
size 5363508888
|
model-00027-of-00132.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:228c4d3bab5fe24aebcaf841b3ab1d556e09783a5f8a37e08e1765e9e9215177
|
| 3 |
+
size 5354671464
|
model-00035-of-00132.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:19f556cc2d441790060d215148a319118ac86599e33fa31be2c12d048ce295cb
|
| 3 |
+
size 5353072688
|
model-00040-of-00132.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a3848e1fca798383ee1ad3fbec48a6521e9f7b2a91c75a7d08f825419fdad737
|
| 3 |
+
size 5365198608
|
model-00056-of-00132.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:54f31364a780be69e6ec885497768a280c29d12e07ddfe5b6ec22a583b447c76
|
| 3 |
+
size 5363508840
|
model-00059-of-00132.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9e9af47022ff2bf28a66c41e0bfd75bd81cec8062c7af96d62bc399118ac89f0
|
| 3 |
+
size 5363508904
|
model-00060-of-00132.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:2cc33b97d4a5edb138c6c2653ec9e103daf1f13f0927a6e5899bc49ffd383ceb
|
| 3 |
+
size 5365198632
|
model-00086-of-00132.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c7225c522fb0e5ec2602eb0dcf3c86b3b1546964ccb7c4221e9e06d351128bff
|
| 3 |
+
size 5353072712
|
model-00090-of-00132.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:64b7df26b1fe08e7123bd11ce6f73ff8d17115aff95cbe8bc2cf89665420131b
|
| 3 |
+
size 5363508936
|
model-00100-of-00132.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ebc10f904875282d3a16cd8784d8c7bcb8763bfdebf524782cc63227de592530
|
| 3 |
+
size 5365147672
|
model-00111-of-00132.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:adbf34540c73c0ce7c0d188aa07a4bf61bc0be53f6796908ac9ebea070901d6a
|
| 3 |
+
size 5365147792
|
model-00117-of-00132.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4502fdc863c106d15857299459fc2a286f6c8f855370a766f30f00555997b0b6
|
| 3 |
+
size 5365147720
|
model-00127-of-00132.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9a87a2a1ef862dacb26a76b18677b9e0b91bd722919d5370cb9361283d962588
|
| 3 |
+
size 5353062080
|
tokenizer.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9340665016419c825c4bdabbcc9acc43b7ca2c68ce142724afa829abb1be5efd
|
| 3 |
+
size 19970699
|