Instructions to use teknium/Base-GPT4-x-Alpaca-Roleplay-Lora with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use teknium/Base-GPT4-x-Alpaca-Roleplay-Lora with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="teknium/Base-GPT4-x-Alpaca-Roleplay-Lora")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("teknium/Base-GPT4-x-Alpaca-Roleplay-Lora") model = AutoModelForCausalLM.from_pretrained("teknium/Base-GPT4-x-Alpaca-Roleplay-Lora", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use teknium/Base-GPT4-x-Alpaca-Roleplay-Lora with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "teknium/Base-GPT4-x-Alpaca-Roleplay-Lora" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "teknium/Base-GPT4-x-Alpaca-Roleplay-Lora", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/teknium/Base-GPT4-x-Alpaca-Roleplay-Lora
- SGLang
How to use teknium/Base-GPT4-x-Alpaca-Roleplay-Lora 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 "teknium/Base-GPT4-x-Alpaca-Roleplay-Lora" \ --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": "teknium/Base-GPT4-x-Alpaca-Roleplay-Lora", "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 "teknium/Base-GPT4-x-Alpaca-Roleplay-Lora" \ --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": "teknium/Base-GPT4-x-Alpaca-Roleplay-Lora", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use teknium/Base-GPT4-x-Alpaca-Roleplay-Lora with Docker Model Runner:
docker model run hf.co/teknium/Base-GPT4-x-Alpaca-Roleplay-Lora
4bit GPTQ version?
Thanks for training this dataset. I'd love to try it but was curious if you could upload a 4-bit quantized version of this model?
(It would take a lot less space and VRAM). Thanks!
Thanks for training this dataset. I'd love to try it but was curious if you could upload a 4-bit quantized version of this model?
(It would take a lot less space and VRAM). Thanks!
Yes I'll do so right now
Would it be possible to also get a version that works with llama.cpp (https://github.com/ggerganov/llama.cpp)?
Would it be possible to also get a version that works with llama.cpp (https://github.com/ggerganov/llama.cpp)?
I'm sorry I've never worked with it, so I'm not quite sure how to
Thanks for training this dataset. I'd love to try it but was curious if you could upload a 4-bit quantized version of this model?
(It would take a lot less space and VRAM). Thanks!
I'm uploading a version 2 of the RP Lora merged with GPT4-x-Alpaca model in 4bit quantization right now, you can get it here:
https://huggingface.co/teknium/GPT4-x-Alpaca13b-RolePlayLora-4bit-v2
Would it be possible to also get a version that works with llama.cpp (https://github.com/ggerganov/llama.cpp)?
I'm sorry I've never worked with it, so I'm not quite sure how to
I can take a crack at it. It's for compatibility with Llama.cpp