Text Generation
Transformers
Safetensors
English
Chinese
qwen3
rm
cr
conversational
text-generation-inference
Instructions to use codefuse-ai/SWE-CARE-RM with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use codefuse-ai/SWE-CARE-RM with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="codefuse-ai/SWE-CARE-RM") 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("codefuse-ai/SWE-CARE-RM") model = AutoModelForCausalLM.from_pretrained("codefuse-ai/SWE-CARE-RM", 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 codefuse-ai/SWE-CARE-RM with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "codefuse-ai/SWE-CARE-RM" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "codefuse-ai/SWE-CARE-RM", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/codefuse-ai/SWE-CARE-RM
- SGLang
How to use codefuse-ai/SWE-CARE-RM 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 "codefuse-ai/SWE-CARE-RM" \ --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": "codefuse-ai/SWE-CARE-RM", "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 "codefuse-ai/SWE-CARE-RM" \ --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": "codefuse-ai/SWE-CARE-RM", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use codefuse-ai/SWE-CARE-RM with Docker Model Runner:
docker model run hf.co/codefuse-ai/SWE-CARE-RM
Commit History
-
Delete eval_result.json
Verified signaturedadf0d1 -
Update reward_config.json
Verified signaturefcdf090 -
update model card
Verified signatureadd model intro, quick start, citation, etc.9050771 -
Update README.md
Verified signature# SWE-CARE-RM This model is a custom reward model built on top of **Qwen3-8B** with: - a merged **LoRA** adapter - an additional **projector head** - a scalar reward output in **[0, 1]** The model is designed to score the quality of a review conditioned on: 1. an issue / problem statement 2. a code patch 3. a candidate review A higher score means the model considers the review better under the given issue and patch. ## Model Architecture The model consists of: - base model: **Qwen3-8B** - adaptation: **LoRA** - reward head: a custom **MLP projector** - final score: `sigmoid(projector(last_hidden_state[:, -1]))` This repository contains the **merged decoder weights** together with `projector.pth`. ## Input Format The model expects three text fields: - `issue` - `patch` - `review` During inference, the input is formatted as: ```latex <issue>{issue}</issue><patch>{patch}</patch><review>{review}<review> ``` The score is computed from the last token hidden state. ## Quick St…75eae10 -
Upload folder using huggingface_hub
Verified signature6fc77cb -
Upload folder using huggingface_hub
Verified signature23b32ab -
initial commit
Verified signature3c5894b