Text Generation
Transformers
Safetensors
qwen3
text-editing
bitsandbytes
conversational
4-bit precision
Instructions to use kalcy0n/rewriter with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use kalcy0n/rewriter with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="kalcy0n/rewriter") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("kalcy0n/rewriter") model = AutoModelForCausalLM.from_pretrained("kalcy0n/rewriter", 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=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use kalcy0n/rewriter with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "kalcy0n/rewriter" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "kalcy0n/rewriter", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/kalcy0n/rewriter
- SGLang
How to use kalcy0n/rewriter 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 "kalcy0n/rewriter" \ --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": "kalcy0n/rewriter", "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 "kalcy0n/rewriter" \ --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": "kalcy0n/rewriter", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use kalcy0n/rewriter with Docker Model Runner:
docker model run hf.co/kalcy0n/rewriter
Download base-lock.json from kalcy0n/rewriter: direct link, hf CLI and curl.
- Browser
- Download file 1.53 kB
-
https://huggingface.co/kalcy0n/rewriter/resolve/main/base-lock.json
- Command line
-
hf download hf://kalcy0n/rewriter/base-lock.json
-
curl -L -o base-lock.json https://huggingface.co/kalcy0n/rewriter/resolve/main/base-lock.json
1.53 kB
| { | |
| "repo_id": "unsloth/Qwen3-4B-Instruct-2507-unsloth-bnb-4bit", | |
| "revision": "7744afa8566e264af1a92a806d8d9aae00cc7c78", | |
| "files": { | |
| "added_tokens.json": { | |
| "bytes": 707, | |
| "sha256": "c0284b582e14987fbd3d5a2cb2bd139084371ed9acbae488829a1c900833c680" | |
| }, | |
| "chat_template.jinja": { | |
| "bytes": 4040, | |
| "sha256": "40c21f34cf67d8c760ef72f8ad3ae5afad514299d4b06e91dd9a8d705af7b541" | |
| }, | |
| "config.json": { | |
| "bytes": 2485, | |
| "sha256": "36904d135a9f068c98f643f3f67760968ca4e56e11de05ca1a2a2136d62eb5f0" | |
| }, | |
| "generation_config.json": { | |
| "bytes": 237, | |
| "sha256": "1f004e485215f7431b0747a5f8f38576fef7ceb2fcdadc836619105d03ea1a86" | |
| }, | |
| "merges.txt": { | |
| "bytes": 1671853, | |
| "sha256": "8831e4f1a044471340f7c0a83d7bd71306a5b867e95fd870f74d0c5308a904d5" | |
| }, | |
| "model.safetensors": { | |
| "bytes": 3545956414, | |
| "sha256": "bcd75cba3491304d5aad317661dbd9201a25d40f135a2adefcd5d040da8078dc" | |
| }, | |
| "special_tokens_map.json": { | |
| "bytes": 614, | |
| "sha256": "b5acd1507cb3a3539e63369cb4a2b675a599cf13afe62282d371518288967797" | |
| }, | |
| "tokenizer.json": { | |
| "bytes": 11422654, | |
| "sha256": "aeb13307a71acd8fe81861d94ad54ab689df773318809eed3cbe794b4492dae4" | |
| }, | |
| "tokenizer_config.json": { | |
| "bytes": 9653, | |
| "sha256": "acf5987d4c4b056ce50b9157705d406acf55b015e70523d718e670a92262607f" | |
| }, | |
| "vocab.json": { | |
| "bytes": 2776833, | |
| "sha256": "ca10d7e9fb3ed18575dd1e277a2579c16d108e32f27439684afa0e10b1440910" | |
| } | |
| } | |
| } | |