Downloads · 30 days
9
12% of all-time downloads
kewu93/skywork-medarena-lora-v2
skywork-medarena-lora-v2 is a text classification model from kewu93. Use it when you need a label for a piece of text. It is set up for peft. The card lists the license as apache-2.0.
🏆 This is the BEST performing checkpoint from the Skywork MedArena LoRA training, achieving 61.2% accuracy on the test set.
Downloads · 30 days
9
12% of all-time downloads
All-time downloads
75
Public
Repo size
44.5 MB
Likes
0
Public
Click a slice to open those files.
.safetensors27.3 MB · 61%
From the Hugging Face model README
🏆 This is the BEST performing checkpoint from the Skywork MedArena LoRA training, achieving 61.2% accuracy on the test set.
This checkpoint-504 was identified as the optimal model through comprehensive evaluation:
import torch
from transformers import AutoModelForSequenceClassification, AutoTokenizer
from peft import PeftModel
# Load base model and tokenizer
base_model = AutoModelForSequenceClassification.from_pretrained(
"Skywork/Skywork-Reward-V2-Llama-3.1-8B",
num_labels=1,
torch_dtype=torch.bfloat16,
device_map="auto"
)
tokenizer = AutoTokenizer.from_pretrained("Skywork/Skywork-Reward-V2-Llama-3.1-8B")
# Load LoRA adapter
model = PeftModel.from_pretrained(base_model, "kewu93/skywork-medarena-lora-v2")
# Prepare input (use conversation format)
conversation = [
{"role": "user", "content": "What are the symptoms of diabetes?"},
{"role": "assistant", "content": "Common symptoms of diabetes include frequent urination, excessive thirst, unexplained weight loss, fatigue, blurred vision, and slow-healing cuts or wounds. If you experience these symptoms, consult a healthcare provider for proper diagnosis and treatment."}
]
# Tokenize using chat template (IMPORTANT: use this format for best results)
text = tokenizer.apply_chat_template(conversation, tokenize=False, add_generation_prompt=False)
inputs = tokenizer(text, return_tensors="pt", truncation=True, max_length=2048)
# Get reward score
with torch.no_grad():
outputs = model(**inputs)
reward_score = outputs.logits.squeeze().item()
print(f"Reward Score: {reward_score:.4f}")
This model was evaluated using:
| Version | Accuracy | Score Margin | Training |
|---|---|---|---|
| v2 (checkpoint-504) | 61.20% | 0.8204 | 8 epochs |
| v1 (final checkpoint) | 60.60% | 0.5030 | 10 epochs |
| checkpoint-500 | 60.40% | 0.5131 | ~8 epochs |
This model is designed for:
If you use this model, please cite:
@misc{skywork-medarena-lora-v2,
title={Skywork MedArena LoRA v2: Optimal Medical Preference Learning},
author={kewu93},
year={2024},
url={https://huggingface.co/kewu93/skywork-medarena-lora-v2}
}
adapter_config.json: LoRA adapter configurationadapter_model.safetensors: LoRA adapter weights (optimal checkpoint)tokenizer.json, tokenizer_config.json: Tokenizer fileschat_template.jinja: Chat template for proper formattingThis model represents the optimal checkpoint from comprehensive evaluation of multiple training stages, achieving the best balance of accuracy, confidence, and training efficiency.