Text Generation
Transformers
Safetensors
English
looped_transformer
recurrent
looped
conversational
custom_code
Instructions to use mburchell/looped-40m with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use mburchell/looped-40m with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="mburchell/looped-40m", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("mburchell/looped-40m", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use mburchell/looped-40m with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "mburchell/looped-40m" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "mburchell/looped-40m", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/mburchell/looped-40m
- SGLang
How to use mburchell/looped-40m 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 "mburchell/looped-40m" \ --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": "mburchell/looped-40m", "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 "mburchell/looped-40m" \ --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": "mburchell/looped-40m", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use mburchell/looped-40m with Docker Model Runner:
docker model run hf.co/mburchell/looped-40m
Download export-verification.json from mburchell/looped-40m: direct link, hf CLI and curl.
- Browser
- Download file 2.4 kB
-
https://huggingface.co/mburchell/looped-40m/resolve/main/export-verification.json
- Command line
-
hf download hf://mburchell/looped-40m/export-verification.json
-
curl -L -o export-verification.json https://huggingface.co/mburchell/looped-40m/resolve/main/export-verification.json
2.4 kB
| { | |
| "unique_parameters": 40036864, | |
| "effective_layers": 16, | |
| "fp32_logit_tolerance": 0.0002, | |
| "fp32_logits": [ | |
| { | |
| "length": 10, | |
| "max_absolute_error": 3.528594970703125e-05, | |
| "rms_error": 4.087347406311892e-06, | |
| "last_token_argmax_match": true | |
| }, | |
| { | |
| "length": 23, | |
| "max_absolute_error": 8.296966552734375e-05, | |
| "rms_error": 1.165726007457124e-05, | |
| "last_token_argmax_match": true | |
| }, | |
| { | |
| "length": 46, | |
| "max_absolute_error": 7.390975952148438e-05, | |
| "rms_error": 9.356962436868344e-06, | |
| "last_token_argmax_match": true | |
| }, | |
| { | |
| "length": 256, | |
| "max_absolute_error": 3.24249267578125e-05, | |
| "rms_error": 3.5443435990600847e-06, | |
| "last_token_argmax_match": true | |
| }, | |
| { | |
| "length": 1024, | |
| "max_absolute_error": 6.246566772460938e-05, | |
| "rms_error": 4.302738034311915e-06, | |
| "last_token_argmax_match": true | |
| } | |
| ], | |
| "versions": { | |
| "torch": "2.15.0+cu132", | |
| "transformers": "5.22.1", | |
| "tokenizers": "0.23.3", | |
| "keras": "3.15.1", | |
| "safetensors": "0.8.0" | |
| }, | |
| "fp16_logit_tolerance": 0.125, | |
| "fp16_logits": [ | |
| { | |
| "length": 10, | |
| "max_absolute_error": 0.06640625, | |
| "rms_error": 0.0076458691619336605, | |
| "last_token_argmax_match": true | |
| }, | |
| { | |
| "length": 23, | |
| "max_absolute_error": 0.0, | |
| "rms_error": 0.0, | |
| "last_token_argmax_match": true | |
| }, | |
| { | |
| "length": 46, | |
| "max_absolute_error": 0.078125, | |
| "rms_error": 0.009420105256140232, | |
| "last_token_argmax_match": true | |
| }, | |
| { | |
| "length": 256, | |
| "max_absolute_error": 0.03125, | |
| "rms_error": 0.003897859016433358, | |
| "last_token_argmax_match": true | |
| }, | |
| { | |
| "length": 1024, | |
| "max_absolute_error": 0.044921875, | |
| "rms_error": 0.005057042930275202, | |
| "last_token_argmax_match": true | |
| } | |
| ], | |
| "reload_weights_exact": true, | |
| "auto_tokenizer_chat_ids_match": true, | |
| "sample": { | |
| "seed": 42, | |
| "messages": [ | |
| { | |
| "role": "user", | |
| "content": "Hello! How are you?" | |
| } | |
| ], | |
| "reply_ids": [ | |
| 6, | |
| 17499, | |
| 8, | |
| 10, | |
| 230, | |
| 6, | |
| 834, | |
| 8, | |
| 421, | |
| 230, | |
| 7, | |
| 82, | |
| 8, | |
| 700, | |
| 372, | |
| 1910, | |
| 40, | |
| 4 | |
| ], | |
| "reply": "Hello! How can I help you today?" | |
| }, | |
| "source_checkpoint_unchanged": true | |
| } | |