EleutherAI/the_pile_deduplicated
Viewer • Updated • 134M • 23.4k • 113
How to use fla-hub/rwkv7-421M-pile with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="fla-hub/rwkv7-421M-pile", trust_remote_code=True) # Load model directly
from transformers import AutoModelForCausalLM
model = AutoModelForCausalLM.from_pretrained("fla-hub/rwkv7-421M-pile", trust_remote_code=True, dtype="auto")How to use fla-hub/rwkv7-421M-pile with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "fla-hub/rwkv7-421M-pile"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "fla-hub/rwkv7-421M-pile",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'docker model run hf.co/fla-hub/rwkv7-421M-pile
How to use fla-hub/rwkv7-421M-pile with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "fla-hub/rwkv7-421M-pile" \
--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": "fla-hub/rwkv7-421M-pile",
"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 "fla-hub/rwkv7-421M-pile" \
--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": "fla-hub/rwkv7-421M-pile",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'How to use fla-hub/rwkv7-421M-pile with Docker Model Runner:
docker model run hf.co/fla-hub/rwkv7-421M-pile
This is RWKV-7 model under flash-linear attention format.
Install flash-linear-attention and the latest version of transformers before using this model:
pip install git+https://github.com/fla-org/flash-linear-attention
pip install 'transformers>=4.48.0'
You can use this model just as any other HuggingFace models:
from transformers import AutoModelForCausalLM, AutoTokenizer
model = AutoModelForCausalLM.from_pretrained('fla-hub/rwkv7-421M-pile', trust_remote_code=True)
tokenizer = AutoTokenizer.from_pretrained('fla-hub/rwkv7-421M-pile', trust_remote_code=True)
This model is trained on the Pile with a total of 332 billion tokens.
lambada_openai: ppl 7.21 acc 57.9%
piqa: acc 69.2%
Q: safetensors metadata is none.
A: upgrade transformers to >=4.48.0: pip install 'transformers>=4.48.0'
Base model
BlinkDL/rwkv-7-pile