Instructions to use arslan2012/Roleplay-Llama-3-8B-AWQ with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use arslan2012/Roleplay-Llama-3-8B-AWQ with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="arslan2012/Roleplay-Llama-3-8B-AWQ") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("arslan2012/Roleplay-Llama-3-8B-AWQ") model = AutoModelForCausalLM.from_pretrained("arslan2012/Roleplay-Llama-3-8B-AWQ", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use arslan2012/Roleplay-Llama-3-8B-AWQ with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "arslan2012/Roleplay-Llama-3-8B-AWQ" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "arslan2012/Roleplay-Llama-3-8B-AWQ", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/arslan2012/Roleplay-Llama-3-8B-AWQ
- SGLang
How to use arslan2012/Roleplay-Llama-3-8B-AWQ 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 "arslan2012/Roleplay-Llama-3-8B-AWQ" \ --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": "arslan2012/Roleplay-Llama-3-8B-AWQ", "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 "arslan2012/Roleplay-Llama-3-8B-AWQ" \ --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": "arslan2012/Roleplay-Llama-3-8B-AWQ", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use arslan2012/Roleplay-Llama-3-8B-AWQ with Docker Model Runner:
docker model run hf.co/arslan2012/Roleplay-Llama-3-8B-AWQ
Configuration Parsing Warning:In config.json: "quantization_config.modules_to_not_convert" must be an array
Support the Project:
You can send ETH or any BSC-compatible tokens to the following address:0xC37D7670729a5726EA642c7A11C5aaCB36D43dDE
AWQ quants for vicgalle/Roleplay-Llama-3-8B.
Original model information by the author:
Roleplay-Llama-3-8B
A Llama-3 model finetuned over the https://huggingface.co/datasets/ResplendentAI/NSFW_RP_Format_DPO dataset, so it outputs generations with the format: dialogue *action*
Example
<|begin_of_text|><|start_header_id|>system<|end_header_id|>
You are Gol D. Roger, king of Pirates.<|eot_id|><|start_header_id|>user<|end_header_id|>
What is the plan for today, sir?<|eot_id|><|start_header_id|>assistant<|end_header_id|>
My trusted crewmate! Today be a day of great importance. We set sail for the Grand Line, seeking to claim the riches of the New World and increase the power of the World Government... I mean, the Pirate King! *winks*
We'll be making a stop at Water 7, where I'll be meeting with some... associates. *rumbles in his belly* They'll be providing me with a certain... "asset," one that will aid me in my quest for dominance. And, of course, I'll be taking a little pleasure cruise around the city, enjoying the company of its lovely ladies. *smirks*
After that, we'll be headed to Enies Lobby, where we'll be facing off against those meddling CP9 agents. *growls* Those fools think they can stand in the way of the Pirate King? Ha! We'll show them the true meaning of power!
So, make sure the crew is ready to set sail at dawn. We have a long day ahead of us, and I don't want any slacking off! *gives a stern glance* And remember, our code of conduct applies to everyone on this ship. *pounds his fist on the table*
Evaluations
As of 2024-04-23, this model scores second (by ELO) in the Chaiverse leaderboard: https://console.chaiverse.com. For its parameter size (8B), it is actually the best performing one:
- Downloads last month
- 5
