Weevil Models
Collection
Weevil pretrained and QA models: 10M and 3M variants. • 4 items • Updated
How to use ELBennett/Weevil-10M-QA with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="ELBennett/Weevil-10M-QA", trust_remote_code=True) # pip install -U transformers accelerate
# Load model directly
from transformers import AutoModelForCausalLM
model = AutoModelForCausalLM.from_pretrained("ELBennett/Weevil-10M-QA", trust_remote_code=True, device_map="auto")How to use ELBennett/Weevil-10M-QA with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "ELBennett/Weevil-10M-QA"
# 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-10M-QA",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'docker model run hf.co/ELBennett/Weevil-10M-QA
How to use ELBennett/Weevil-10M-QA with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "ELBennett/Weevil-10M-QA" \
--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-10M-QA",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'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-10M-QA" \
--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-10M-QA",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'How to use ELBennett/Weevil-10M-QA with Docker Model Runner:
docker model run hf.co/ELBennett/Weevil-10M-QA
QA-fine-tuned with a 90% broad-QA / 10% benchmark-training mixture. 9,894,464 parameters, eight parallel GDN2/SwiGLU blocks, and a shared 4,096-token BPE tokenizer. Uses the shared Weevil Transformers implementation.
from transformers import AutoModelForCausalLM, AutoTokenizer
repo = "ELBennett/Weevil-10M-QA"
tokenizer = AutoTokenizer.from_pretrained(repo, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(repo, trust_remote_code=True)
inputs = tokenizer("The purpose of this article is", return_tensors="pt")
output = model.generate(**inputs, max_new_tokens=64, do_sample=True,
temperature=0.8, top_k=40)
print(tokenizer.decode(output[0], skip_special_tokens=True))
Requires PyTorch and Transformers (pip install torch 'transformers>=4.57,<6').
Weights are safetensors; generation uses fixed-size recurrent/convolution caches.
Source checkpoint: step-00015625. This is a continuation model, with no chat template.