Instructions to use Chun121/Qwen3-4B-RPG-Roleplay-V2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Chun121/Qwen3-4B-RPG-Roleplay-V2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Chun121/Qwen3-4B-RPG-Roleplay-V2") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("Chun121/Qwen3-4B-RPG-Roleplay-V2", dtype="auto") - llama-cpp-python
How to use Chun121/Qwen3-4B-RPG-Roleplay-V2 with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="Chun121/Qwen3-4B-RPG-Roleplay-V2", filename="unsloth.F16.gguf", )
llm.create_chat_completion( messages = [ { "role": "user", "content": "What is the capital of France?" } ] ) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use Chun121/Qwen3-4B-RPG-Roleplay-V2 with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf Chun121/Qwen3-4B-RPG-Roleplay-V2:Q4_K_M # Run inference directly in the terminal: llama-cli -hf Chun121/Qwen3-4B-RPG-Roleplay-V2:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf Chun121/Qwen3-4B-RPG-Roleplay-V2:Q4_K_M # Run inference directly in the terminal: llama-cli -hf Chun121/Qwen3-4B-RPG-Roleplay-V2:Q4_K_M
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf Chun121/Qwen3-4B-RPG-Roleplay-V2:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf Chun121/Qwen3-4B-RPG-Roleplay-V2:Q4_K_M
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf Chun121/Qwen3-4B-RPG-Roleplay-V2:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf Chun121/Qwen3-4B-RPG-Roleplay-V2:Q4_K_M
Use Docker
docker model run hf.co/Chun121/Qwen3-4B-RPG-Roleplay-V2:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use Chun121/Qwen3-4B-RPG-Roleplay-V2 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Chun121/Qwen3-4B-RPG-Roleplay-V2" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Chun121/Qwen3-4B-RPG-Roleplay-V2", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Chun121/Qwen3-4B-RPG-Roleplay-V2:Q4_K_M
- SGLang
How to use Chun121/Qwen3-4B-RPG-Roleplay-V2 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 "Chun121/Qwen3-4B-RPG-Roleplay-V2" \ --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": "Chun121/Qwen3-4B-RPG-Roleplay-V2", "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 "Chun121/Qwen3-4B-RPG-Roleplay-V2" \ --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": "Chun121/Qwen3-4B-RPG-Roleplay-V2", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use Chun121/Qwen3-4B-RPG-Roleplay-V2 with Ollama:
ollama run hf.co/Chun121/Qwen3-4B-RPG-Roleplay-V2:Q4_K_M
- Unsloth Studio
How to use Chun121/Qwen3-4B-RPG-Roleplay-V2 with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for Chun121/Qwen3-4B-RPG-Roleplay-V2 to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for Chun121/Qwen3-4B-RPG-Roleplay-V2 to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for Chun121/Qwen3-4B-RPG-Roleplay-V2 to start chatting
- Atomic Chat new
- Docker Model Runner
How to use Chun121/Qwen3-4B-RPG-Roleplay-V2 with Docker Model Runner:
docker model run hf.co/Chun121/Qwen3-4B-RPG-Roleplay-V2:Q4_K_M
- Lemonade
How to use Chun121/Qwen3-4B-RPG-Roleplay-V2 with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull Chun121/Qwen3-4B-RPG-Roleplay-V2:Q4_K_M
Run and chat with the model
lemonade run user.Qwen3-4B-RPG-Roleplay-V2-Q4_K_M
List all available models
lemonade list
Such interesting technique! Must study! Request feedback!
If you have run this model and can compare to stock Qwen3-4B, please share your experiences!
I find the readme.md here fascinating. Good work and thank you!
Hey there! Glad you liked the technique, I trained it back when unsloth released it's initial grpo and rl powered training notebook, using custom data and some additional techniques to finetune the qwen 4b model.
It provided much more creative text when provided with properly structured prompt format (As provided in readme, and the dataset), and much less rejections on nsfw/explicit topics.
Though sadly I was limited by the free architecture, this was trained on google colab's free t4 gpu (Kaggle's t4 x2 isn't supported by unsloth), hence the 2048 context limit, I didn't perform any benchmarks as a limit of context would be a really big bottleneck, but hey if you have the compute and want to try the lora weights on the model feel free! it's based on bnb 4bit version so it's inference friendly.
P.S. There is an attached link to the official unsloth training notebook used from unlsloth if you want to dive deeper into code, though it should be noted that there are updated scripts available on their website with better optimizations now.
What's interesting to me is that the original models seem pretty ignorant of nsfw-writing so it's pretty clear when I see the post-training 'take over'.
There's very much a sense of snippets of NSW dialogue being remembered and inserted on top of a base that 'thinks' quite differently.
Fascinating stuf.
[EDIT] So this NSFW imprinting seems to yield in a model not suitable for general purpose RP, like 'Customer service representative'
What's interesting to me is that the original models seem pretty ignorant of nsfw-writing so it's pretty clear when I see the post-training 'take over'.
There's very much a sense of snippets of NSW dialogue being remembered and inserted on top of a base that 'thinks' quite differently.
Fascinating stuf.
[EDIT] So this NSFW imprinting seems to yield in a model not suitable for general purpose RP, like 'Customer service representative'
Yep, tbh it gets less interesting once I realized the models are just generating reasoning chain which is just part of its actual response based on chat template, simply separated by tags which easily erode over time if training it without grpo/rl and starts responding without reasoning chains sometimes (my previous model v1 had this issue).
But yeah RL is amazing, incentivizes the model to generate correct reasoning chain instead of correct response, which makes it less prone to overfitting and keeps final answer coherent but creative.
Sadly the model was trained on nsfw dataset as it was pretty high quality claude dataset, but there are many sfw creative writing datasets, they will serve you well with the task for customer service, check out "aciborowska/customers-complaints-train-eval" you can do some prompt structuring before injection and you will get an pretty coherent customer agent, but to be honest customer support agent always work well with RAG, without that it's pointless, and rag does turn model a bit monotonous.
Please help me understand: Do I use this model just by itself, say in Koboldcpp? Or is it an addon to another model? If it is an addon, then how to use it in Koboldcpp? Thanks.
Please help me understand: Do I use this model just by itself, say in Koboldcpp? Or is it an addon to another model? If it is an addon, then how to use it in Koboldcpp? Thanks.
You can use it on any inference system that support qwen 3 architecture, there's gguf for better inference on any framework including koboldcpp, just download any quantization you want and load it in kobold, or you can use lora if you want to try it on original model, it increases context window from 2048 (current) to 128k~
Please help me understand: Do I use this model just by itself, say in Koboldcpp? Or is it an addon to another model? If it is an addon, then how to use it in Koboldcpp? Thanks.
You can use it on any inference system that support qwen 3 architecture, there's gguf for better inference on any framework including koboldcpp, just download any quantization you want and load it in kobold, or you can use lora if you want to try it on original model, it increases context window from 2048 (current) to 128k~
You can find out how to use lora adapters here:
https://docs.vllm.ai/en/v0.9.1/features/lora.html#serving-lora-adapters
Yeah or lora-ing on a mix of datasets from shades of different genres.
It would be great if we could curate RP datasets with all kinds of different shades of style and mix-and match-bake them together in semi-automated way, assigning say x weight to Tolkien, or y weight to '1960s bawdy novels'. etc.
There seems to be unexplored potential or building system to curate datasets for LoRa to bias style to the user's particular style and behavior vision.
Hm.
So neat. Thank you for this teaching!
hoesting it on api.airforce now
hoesting it on api.airforce now
Thanks for checking the model out! It's an experimental take on rp setup. Also I checked the platform, it's pretty cool but somehow free users are able to use claude and grok 4.1 models, I hope that's an bug because it might incur a lot of charges, but it's cool nevertheless~
Thanks for checking the model out! It's an experimental take on rp setup. Also I checked the platform, it's pretty cool but somehow free users are able to use claude and grok 4.1 models, I hope that's an bug because it might incur a lot of charges, but it's cool nevertheless~
Hey!
Thanks for checking the site out :)
It's meant to provide those models for free (limited), thanks for the hicup π