Text Generation
Transformers
Safetensors
Chinese
qwen3_5_text
rewrite2
novel-rewrite
novel-expansion
chinese
fp8
conversational
modelopt
Run this model with HF Jobs
Run beileng/rewrite2-27b-fp8 on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs and TRL to fine-tune https://huggingface.co/beileng/rewrite2-27b-fp8. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/beileng/rewrite2-27b-fp8 on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Evaluate on a benchmark
Use HF Jobs to evaluate https://huggingface.co/beileng/rewrite2-27b-fp8. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
Quantize for lower memory use
Use HF Jobs to create a 4-bit version of https://huggingface.co/beileng/rewrite2-27b-fp8. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.
Instructions to use beileng/rewrite2-27b-fp8 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use beileng/rewrite2-27b-fp8 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="beileng/rewrite2-27b-fp8") 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("beileng/rewrite2-27b-fp8") model = AutoModelForCausalLM.from_pretrained("beileng/rewrite2-27b-fp8", 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 beileng/rewrite2-27b-fp8 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "beileng/rewrite2-27b-fp8" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "beileng/rewrite2-27b-fp8", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/beileng/rewrite2-27b-fp8
- SGLang
How to use beileng/rewrite2-27b-fp8 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 "beileng/rewrite2-27b-fp8" \ --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": "beileng/rewrite2-27b-fp8", "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 "beileng/rewrite2-27b-fp8" \ --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": "beileng/rewrite2-27b-fp8", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use beileng/rewrite2-27b-fp8 with Docker Model Runner:
docker model run hf.co/beileng/rewrite2-27b-fp8
北棱 commited on
rewrite model card: prompts, usage, formats, limits
Browse files1234567891011121314151699a56ad067829913afe45df8c72a5f4cb1c86f1d641b00030e20946dae98fd9e INSTRUCTION.txt3dfd1338d29a823e4b76ed1ef50ef416298615e553b93b1d6eeb00e4376e85ee INSTRUCTION_expand.txt99a56ad067829913afe45df8c72a5f4cb1c86f1d641b00030e20946dae98fd9e INSTRUCTION_rewrite.txtb7b472993371b2ab001c50270238a0ef3bb6af4387a820bc5a7988f3f9ca0c62 README.md55214e33885e80bb178b73cee2e4cd9fd50ae51ea796f61cc96575760a7c4e82 chat_template.jinja1db3706ba3b587bbd6d525373656948e468db9ca3462835f149053e47d53c5db config.jsone70c136c1b78ddc1fb0905bac8e733a4dc448d4f852a5dd75143fffc70be550e generation_config.json358a39ce904435bf97a399d381667df9e626cfa944ebd7af6662d1195902066a hf_quant_config.jsona9d356d7bdf1ef4949e3e748e95b8e10ad9d4e2e838eddc38a0a7b6b94d1db8d merges.txtc1112b99515dc25fcf38976c495f9d8be7f296c8e441e2d8097313179ea6627e model-00001-of-00003.safetensors90621fa01b0b426db5b3c25c2e126998b0d092e5b25eecb06a66387cc3e389f1 model-00002-of-00003.safetensorsf3c7956935202931e6e840f163e51830b3bfb34c6e48f1d0db7aee49402d6122 model-00003-of-00003.safetensorsa85094932d60e372149bc4a38b5194fb7cc3d6fd03f19110048a4f2b80e10bfa model.safetensors.index.json06b9509352d2af50381ab2247e083b80d32d5c0aba91c272ca9ff729b6a0e523 tokenizer.json66e427c470fe580fe8c7b5725d857af23d8417e37fae62667ec698306a19987b tokenizer_config.jsonce99b4cb2983d118806ce0a8b777a35b093e2000a503ebde25853284c9dfa003 vocab.jsonSHA256SUMSAdded+16