Instructions to use recursal/QRWKV6-32B-Instruct-Preview-v0.1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use recursal/QRWKV6-32B-Instruct-Preview-v0.1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="recursal/QRWKV6-32B-Instruct-Preview-v0.1", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("recursal/QRWKV6-32B-Instruct-Preview-v0.1", trust_remote_code=True, dtype="auto") - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use recursal/QRWKV6-32B-Instruct-Preview-v0.1 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "recursal/QRWKV6-32B-Instruct-Preview-v0.1" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "recursal/QRWKV6-32B-Instruct-Preview-v0.1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/recursal/QRWKV6-32B-Instruct-Preview-v0.1
- SGLang
How to use recursal/QRWKV6-32B-Instruct-Preview-v0.1 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 "recursal/QRWKV6-32B-Instruct-Preview-v0.1" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "recursal/QRWKV6-32B-Instruct-Preview-v0.1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "recursal/QRWKV6-32B-Instruct-Preview-v0.1" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "recursal/QRWKV6-32B-Instruct-Preview-v0.1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use recursal/QRWKV6-32B-Instruct-Preview-v0.1 with Docker Model Runner:
docker model run hf.co/recursal/QRWKV6-32B-Instruct-Preview-v0.1
recursal/QRWKV6-32B-Instruct-Preview-v0.1
Compute sponsored by TensorWave - Access MI300X today!
QRWKV6 32B Instruct Preview is one of the largest and strongest RWKV model to date.
More details can be found at: https://substack.recursal.ai/p/q-rwkv-6-32b-instruct-preview
Evaluation
The follow demostrates that QRWKV6 performs either similarly or ahead of it's base model: Qwen2.5-32B-Instruct
| Model | MMLU | arc_challenge | arc_easy | hellaSwag | lambada_openai | piqa | sciq | winogrande |
|---|---|---|---|---|---|---|---|---|
| QRWKV6-32B-Instruct | 76.63% | 60.92% | 83.00% | 83.03% | 74.17% | 82.92% | 95.40% | 78.22% |
| Qwen2.5-32B-Instruct | 81.77% | 58.70% | 77.06% | 85.19% | 75.22% | 81.23% | 95.00% | 72.85% |
| RWKV-EagleX-7B-v2 | 43.84% | 41.55% | 74.45% | 56.00% | 75.02% | 77.64% | 93.00% | 73.32% |
| Falcon-Mamba-7B | 59.72% | 59.13% | 81.73% | 80.21% | 68.89% | 82.15% | 93.60% | 74.35% |
| Llama-3.1-8B-Instruct | 68.11% | 55.29% | 79.71% | 79.27% | 73.12% | 80.85% | 96.20% | 74.19% |
| Llama-3.1-70B-Instruct | 82.40% | 63.40% | 83.50% | 84.62% | 75.68% | 83.79% | 97.10% | 79.08% |
Model Notes
Linear models offer a promising approach to significantly reduce computational costs at scale, particularly for large context lengths. This enables a more than 1000x improvement in inference cost efficiency, enabling both O1-style inference time thinking and wider AI accessibility.
We are able to convert any previously trained QKV Attention-based model, such as Qwen and LLaMA, into an RWKV variant without requiring retraining from scratch. Enabling us to rapidly test and validate the significantly more efficient RWKV Linear attention mechanism at a larger scale with a much smaller budget, bypassing the need for training from scratch.
This approach demonstrates the architecture design and scalability of RWKV, reinforcing the idea that QKV attention is not the sole essential component.
One downside to this technique is that the model's inherent knowledge and dataset training are inherited from its "parent" model. Consequently, unlike previous RWKV models trained on over 100+ languages, the QRWKV model is limited to approximately 30 languages supported by the Qwen line of models.
Due to the the lack of RWKV-based channel mix and feedforward layers, separate inference code is needed for this specific model.
Furthermore, due to compute constraints, we were only able to train up to 16K token context length. While the model is stable beyond this limit, additional training might be required to support longer context lengths.
Future Models
We are currently training Q-RWKV-6 72B. Additionally, with the finalization of RWKV-7 we plan to apply the same process and provide a full line up of:
- Q-RWKV-7 32B
- LLaMA-RWKV-7 70B
Lastly, we intend to provide details on the conversion along with our paper after the model release.
Links
- Our wiki
- TensorWave - The AMD Cloud - Access MI300X today!
- Recursal.AI Cloud Platform
- Featherless Inference
Acknowledgement
We are grateful for the help and support from the following key groups:
- TensorWave - Sponsored the compute needed to train this model. It wouldn't be possible without them.
- EleutherAI for their support, especially in the v5/v6 Eagle/Finch paper.
- Linux Foundation AI & Data group for supporting and hosting the RWKV project.
- Recursal for their support in building and managing the training of this model architecture.
- Downloads last month
- 59
