Instructions to use Amogh06/PPO-QLoRA-SafeGenAI with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use Amogh06/PPO-QLoRA-SafeGenAI with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("openai-community/gpt2-medium") model = PeftModel.from_pretrained(base_model, "Amogh06/PPO-QLoRA-SafeGenAI") - Transformers
How to use Amogh06/PPO-QLoRA-SafeGenAI with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Amogh06/PPO-QLoRA-SafeGenAI")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("Amogh06/PPO-QLoRA-SafeGenAI", dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use Amogh06/PPO-QLoRA-SafeGenAI with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Amogh06/PPO-QLoRA-SafeGenAI" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Amogh06/PPO-QLoRA-SafeGenAI", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Amogh06/PPO-QLoRA-SafeGenAI
- SGLang
How to use Amogh06/PPO-QLoRA-SafeGenAI 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 "Amogh06/PPO-QLoRA-SafeGenAI" \ --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": "Amogh06/PPO-QLoRA-SafeGenAI", "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 "Amogh06/PPO-QLoRA-SafeGenAI" \ --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": "Amogh06/PPO-QLoRA-SafeGenAI", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Amogh06/PPO-QLoRA-SafeGenAI with Docker Model Runner:
docker model run hf.co/Amogh06/PPO-QLoRA-SafeGenAI
- Xet hash:
- cead6705df065e44c875a3ab95121c2a18cbe9ef268f40d4ebd3bea8d8174c1a
- Size of remote file:
- 6.04 kB
- SHA256:
- 0d20857edea33fa201dcd48c84f565cf23aa2ca4be01b55f29bd53697348e0fb
·
Xet efficiently stores Large Files inside Git, intelligently splitting files into unique chunks and accelerating uploads and downloads. More info.