Text Generation
Transformers
Safetensors
English
weevil_recurrent
weevil
recurrent
gated-deltanet
custom_code
Instructions to use ELBennett/Weevil-Recurrent-16M-Base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ELBennett/Weevil-Recurrent-16M-Base with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="ELBennett/Weevil-Recurrent-16M-Base", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("ELBennett/Weevil-Recurrent-16M-Base", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use ELBennett/Weevil-Recurrent-16M-Base with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ELBennett/Weevil-Recurrent-16M-Base" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ELBennett/Weevil-Recurrent-16M-Base", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/ELBennett/Weevil-Recurrent-16M-Base
- SGLang
How to use ELBennett/Weevil-Recurrent-16M-Base 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 "ELBennett/Weevil-Recurrent-16M-Base" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ELBennett/Weevil-Recurrent-16M-Base", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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 "ELBennett/Weevil-Recurrent-16M-Base" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ELBennett/Weevil-Recurrent-16M-Base", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use ELBennett/Weevil-Recurrent-16M-Base with Docker Model Runner:
docker model run hf.co/ELBennett/Weevil-Recurrent-16M-Base
File size: 932 Bytes
f1b1d76 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | {
"architectures": [
"WeevilRecurrentForCausalLM"
],
"auto_map": {
"AutoConfig": "configuration_weevil_recurrent.WeevilRecurrentConfig",
"AutoModel": "modeling_weevil_recurrent.WeevilRecurrentModel",
"AutoModelForCausalLM": "modeling_weevil_recurrent.WeevilRecurrentForCausalLM"
},
"bos_token_id": 50281,
"chunk_size": 32,
"coda_layers": 2,
"compute_dtype": "bfloat16",
"conv_kernel": 4,
"core_passes": 16,
"dtype": "float32",
"embedding_dim": 128,
"eos_token_id": 50279,
"head_dim": 16,
"hidden_size": 256,
"intermediate_size": 1024,
"max_position_embeddings": 8192,
"model_type": "weevil_recurrent",
"norm_eps": 1e-06,
"num_heads": 16,
"pad_token_id": 50283,
"pause_token_id": 50285,
"prelude_layers": 2,
"recurrent_layers": 4,
"tie_word_embeddings": false,
"transformers_version": "5.19.0",
"unk_token_id": 50280,
"use_cache": true,
"vocab_size": 50368
}
|