Instructions to use paperfun/rwkv with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use paperfun/rwkv with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="paperfun/rwkv", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("paperfun/rwkv", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use paperfun/rwkv with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "paperfun/rwkv" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "paperfun/rwkv", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/paperfun/rwkv
- SGLang
How to use paperfun/rwkv 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 "paperfun/rwkv" \ --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": "paperfun/rwkv", "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 "paperfun/rwkv" \ --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": "paperfun/rwkv", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use paperfun/rwkv with Docker Model Runner:
docker model run hf.co/paperfun/rwkv
Commit History
-
Upload 3 files
Verified signature778c68a -
Upload 3 files
Verified signatured8a3557
-
Upload RWKV-x060-World-7B-v2.1-20240507-ctx4096-q4k.gguf
Verified signaturea50c981
-
Rename config-0b4.json to config_0b4.json
Verified signature5e69a4a -
Upload config_7b.json
Verified signature5bee2a9
-
Upload 2 files
Verified signature5010cef
-
Upload config_3b.json
Verified signature7ff0445
-
Upload RWKV-x060-World-1B6-v2.1-20240328-ctx4096.safetensors
Verified signaturea41aa4f -
Upload RWKV-x060-World-1B6-v2.1-20240328-ctx4096-q4k.gguf
Verified signature24d24f4
-
Upload 2 files
Verified signaturec96b6e5 -
Upload rwkv-5-world-0b4.safetensors
Verified signature905a38f
-
add config
bfd8984
-
add rwkv 6 world
3a431cd -
initial commit
Verified signature0782236