RetNet-0.5B - from-scratch training line
Collection
From-scratch 0.5B RetNet (21.6 B tokens): epoch 1-3, repair v21.1, long-context v21.2, chat v21.3-chat, 16k/8k research exports. โข 16 items โข Updated
How to use Ayaka157/RetNet-143M with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="Ayaka157/RetNet-143M", trust_remote_code=True) # pip install -U transformers accelerate
# Load model directly
from transformers import AutoModelForCausalLM
model = AutoModelForCausalLM.from_pretrained("Ayaka157/RetNet-143M", trust_remote_code=True, device_map="auto")How to use Ayaka157/RetNet-143M with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "Ayaka157/RetNet-143M"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "Ayaka157/RetNet-143M",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'docker model run hf.co/Ayaka157/RetNet-143M
How to use Ayaka157/RetNet-143M with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "Ayaka157/RetNet-143M" \
--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": "Ayaka157/RetNet-143M",
"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 "Ayaka157/RetNet-143M" \
--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": "Ayaka157/RetNet-143M",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'How to use Ayaka157/RetNet-143M with Docker Model Runner:
docker model run hf.co/Ayaka157/RetNet-143M