Instructions to use StarRing2022/RWKV-430M-Pile-Alpaca with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use StarRing2022/RWKV-430M-Pile-Alpaca with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="StarRing2022/RWKV-430M-Pile-Alpaca")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("StarRing2022/RWKV-430M-Pile-Alpaca") model = AutoModelForCausalLM.from_pretrained("StarRing2022/RWKV-430M-Pile-Alpaca", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use StarRing2022/RWKV-430M-Pile-Alpaca with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "StarRing2022/RWKV-430M-Pile-Alpaca" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "StarRing2022/RWKV-430M-Pile-Alpaca", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/StarRing2022/RWKV-430M-Pile-Alpaca
- SGLang
How to use StarRing2022/RWKV-430M-Pile-Alpaca 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 "StarRing2022/RWKV-430M-Pile-Alpaca" \ --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": "StarRing2022/RWKV-430M-Pile-Alpaca", "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 "StarRing2022/RWKV-430M-Pile-Alpaca" \ --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": "StarRing2022/RWKV-430M-Pile-Alpaca", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use StarRing2022/RWKV-430M-Pile-Alpaca with Docker Model Runner:
docker model run hf.co/StarRing2022/RWKV-430M-Pile-Alpaca
使用HF的接口很方便地对RWKV在Alpaca格式数据集上进行全量微调及部署服务
底座模型:RWKV-430M-pile(sgugger/rwkv-430M-pile)
数据集:test.json,测试用
硬件设备:4090单卡,64G内存
训练轮数:100轮
训练耗时:5分钟左右
HF空间:https://huggingface.co/spaces/StarRing2022/Rwkv-430M-pile-Alpaca-Run
GIT开源地址:https://github.com/StarRing2022/HF-For-RWKVRaven-Alpaca/
- Downloads last month
- 18