Text Generation
Transformers
Safetensors
qwen2
llama-factory
Generated from Trainer
conversational
text-generation-inference
Instructions to use AQuarterMile/WritingBench-Critic-Model-Qwen-7B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use AQuarterMile/WritingBench-Critic-Model-Qwen-7B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="AQuarterMile/WritingBench-Critic-Model-Qwen-7B") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("AQuarterMile/WritingBench-Critic-Model-Qwen-7B") model = AutoModelForCausalLM.from_pretrained("AQuarterMile/WritingBench-Critic-Model-Qwen-7B") 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]:])) - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use AQuarterMile/WritingBench-Critic-Model-Qwen-7B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "AQuarterMile/WritingBench-Critic-Model-Qwen-7B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "AQuarterMile/WritingBench-Critic-Model-Qwen-7B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/AQuarterMile/WritingBench-Critic-Model-Qwen-7B
- SGLang
How to use AQuarterMile/WritingBench-Critic-Model-Qwen-7B 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 "AQuarterMile/WritingBench-Critic-Model-Qwen-7B" \ --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": "AQuarterMile/WritingBench-Critic-Model-Qwen-7B", "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 "AQuarterMile/WritingBench-Critic-Model-Qwen-7B" \ --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": "AQuarterMile/WritingBench-Critic-Model-Qwen-7B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use AQuarterMile/WritingBench-Critic-Model-Qwen-7B with Docker Model Runner:
docker model run hf.co/AQuarterMile/WritingBench-Critic-Model-Qwen-7B
Improve language tag
#2
by lbourdois - opened
README.md
CHANGED
|
@@ -1,64 +1,78 @@
|
|
| 1 |
-
---
|
| 2 |
-
base_model: Qwen/Qwen2.5-7B-Instruct
|
| 3 |
-
library_name: transformers
|
| 4 |
-
license: apache-2.0
|
| 5 |
-
tags:
|
| 6 |
-
- llama-factory
|
| 7 |
-
- generated_from_trainer
|
| 8 |
-
pipeline_tag: text-generation
|
| 9 |
-
|
| 10 |
-
-
|
| 11 |
-
|
| 12 |
-
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
-
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
-
|
| 39 |
-
|
| 40 |
-
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
-
|
| 51 |
-
-
|
| 52 |
-
-
|
| 53 |
-
-
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
|
| 64 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
base_model: Qwen/Qwen2.5-7B-Instruct
|
| 3 |
+
library_name: transformers
|
| 4 |
+
license: apache-2.0
|
| 5 |
+
tags:
|
| 6 |
+
- llama-factory
|
| 7 |
+
- generated_from_trainer
|
| 8 |
+
pipeline_tag: text-generation
|
| 9 |
+
language:
|
| 10 |
+
- zho
|
| 11 |
+
- eng
|
| 12 |
+
- fra
|
| 13 |
+
- spa
|
| 14 |
+
- por
|
| 15 |
+
- deu
|
| 16 |
+
- ita
|
| 17 |
+
- rus
|
| 18 |
+
- jpn
|
| 19 |
+
- kor
|
| 20 |
+
- vie
|
| 21 |
+
- tha
|
| 22 |
+
- ara
|
| 23 |
+
model-index:
|
| 24 |
+
- name: WritingBench-Critic-Model-Qwen-7B
|
| 25 |
+
results: []
|
| 26 |
+
---
|
| 27 |
+
|
| 28 |
+
|
| 29 |
+
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
| 30 |
+
should probably proofread and complete it, then remove this comment. -->
|
| 31 |
+
|
| 32 |
+
# WritingBench-Critic-Model-Qwen-7B
|
| 33 |
+
|
| 34 |
+
<p align="center">
|
| 35 |
+
π <a href="https://arxiv.org/abs/2503.05244" target="_blank">[Paper]</a> β’ π <a href="https://github.com/X-PLUG/WritingBench" target="_blank">[Github Repo]</a> β’ π <a href="https://huggingface.co/AQuarterMile/WritingBench-Critic-Model-Qwen-7B" target="_blank">[Critic Model]</a> β’ βοΈ <a href="https://huggingface.co/AQuarterMile/Writing-Model-Qwen-7B" target="_blank">[Writer-7B]</a> <a href="https://huggingface.co/AQuarterMile/Writing-Model-Qwen-32B-thinking" target="_blank">[Writer-32B]</a>
|
| 36 |
+
</p>
|
| 37 |
+
|
| 38 |
+
This model is fine-tuned from [Qwen/Qwen2.5-7B-Instruct](https://huggingface.co/Qwen/Qwen2.5-7B-Instruct) on a 50K SFT dataset for writing evaluation tasks.
|
| 39 |
+
|
| 40 |
+
For each criterion, the evaluator independently assigns a score on a 10-point scale to a response, providing both a score and a justification.
|
| 41 |
+
|
| 42 |
+
|
| 43 |
+
## Training procedure
|
| 44 |
+
|
| 45 |
+
### Training hyperparameters
|
| 46 |
+
|
| 47 |
+
The following hyperparameters were used during training:
|
| 48 |
+
- learning_rate: 7e-06
|
| 49 |
+
- train_batch_size: 1
|
| 50 |
+
- eval_batch_size: 8
|
| 51 |
+
- seed: 42
|
| 52 |
+
- distributed_type: multi-GPU
|
| 53 |
+
- num_devices: 8
|
| 54 |
+
- gradient_accumulation_steps: 8
|
| 55 |
+
- total_train_batch_size: 64
|
| 56 |
+
- total_eval_batch_size: 64
|
| 57 |
+
- optimizer: Use OptimizerNames.ADAMW_TORCH with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
|
| 58 |
+
- lr_scheduler_type: cosine
|
| 59 |
+
- lr_scheduler_warmup_ratio: 0.1
|
| 60 |
+
- num_epochs: 3
|
| 61 |
+
|
| 62 |
+
### Framework versions
|
| 63 |
+
|
| 64 |
+
- Transformers 4.46.1
|
| 65 |
+
- Pytorch 2.5.1+cu124
|
| 66 |
+
- Datasets 3.1.0
|
| 67 |
+
- Tokenizers 0.20.3
|
| 68 |
+
|
| 69 |
+
## π Citation
|
| 70 |
+
|
| 71 |
+
```
|
| 72 |
+
@misc{wu2025writingbench,
|
| 73 |
+
title={WritingBench: A Comprehensive Benchmark for Generative Writing},
|
| 74 |
+
author={Yuning Wu and Jiahao Mei and Ming Yan and Chenliang Li and Shaopeng Lai and Yuran Ren and Zijia Wang and Ji Zhang and Mengyue Wu and Qin Jin and Fei Huang},
|
| 75 |
+
year={2025},
|
| 76 |
+
url={https://arxiv.org/abs/2503.05244},
|
| 77 |
+
}
|
| 78 |
+
```
|