/ Модель

Характеристики

Контекст
40 960 токенов
Параметры
29,7 млрд
Размер весов
65,5 ГБ
Лицензия
Apache 2.0
Архитектура
qwen3 · dense
Базовая модель
Qwen3-32B
Библиотека
transformers
Опубликована
2 мая 2025

Qwen-3-32B-Medical-Reasoning

Генерация текстаТекст → текст3 профессии

Дообученная Qwen3-32B, предназначенная для генерации ответов с рассуждениями по медицинским вопросам.

35скачиваний за 30 дней6лайковвеса обновлены2 мая 2025

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Тесты пользователейпока нет

Никто ещё не опубликовал тест этой модели. Соберите бенчмарк из своих задач — результат появится здесь.

  1. Добавьте модель в бенчмарк

    Вместе с другими моделями категории «Текст» — сравнение идёт внутри одной категории.

  2. Опишите свои задачи

    Напишите запросы, при необходимости приложите файлы и эталонные ответы.

  3. Запустите и опубликуйте

    Модели ответят на каждую задачу, судья оценит ответы. Опубликованный результат появится на этой странице.

Публичные оценки

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

В подключённых источниках результатов для этой модели пока нет.

Что умеет модель

Описание составлено по карточке модели и метаданным Hugging Face

nicoboss/Qwen-3-32B-Medical-Reasoning — дообученная модель Qwen3-32B для генерации ответов с медицинскими рассуждениями. Разработчик дообучил базовую модель Qwen/Qwen3-32B на 2000 примерах набора FreedomIntelligence/medical-o1-reasoning-SFT с использованием PEFT и TRL; в README также описан 4-битный NF4 режим загрузки при обучении. Модель имеет плотную архитектуру Qwen3ForCausalLM и около 29,7 млрд параметров, принимает текст и рассчитана на контекст до 40960 токенов.

Модель предназначена для диалоговых запросов, требующих объяснений и рассуждений по медицинским темам, например для разбора клинических вопросов и подготовки ответов на медицинские задачи. Метаданные указывают английский язык карточки, однако исходная Qwen3 — многоязычная модель. Репозиторий распространяется под лицензией Apache-2.0. README описывает сценарий обучения, но не приводит оценок качества или клинической валидации; выводы модели не следует считать заменой консультации специалиста.

Сценарии применения

  • ответы на медицинские вопросы с пояснением хода рассуждений
  • разбор клинических задач и сценариев
  • подготовка учебных объяснений по медицине

Ограничения

README не сообщает результатов оценки качества или клинической валидации. Модель не заменяет профессиональную медицинскую консультацию.

Для каких профессий подходит3

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

Intro

This is https://huggingface.co/kingabzpro/Qwen-3-32B-Medical-Reasoning applied to https://huggingface.co/Qwen/Qwen3-32B Original model card created by @kingabzpro


Original model card from @kingabzpro

Fine-tuning Qwen3-32B in 4-bit Quantization for Medical Reasoning

This project fine-tunes the Qwen/Qwen3-32B model using a medical reasoning dataset (FreedomIntelligence/medical-o1-reasoning-SFT) with 4-bit quantization for memory-efficient training.


Setup

  1. Install the required libraries:
pip install -U datasets accelerate peft trl bitsandbytes
pip install -U transformers
pip install huggingface_hub[hf_xet]
  1. Authenticate with Hugging Face Hub:

Make sure your Hugging Face token is stored in an environment variable:

export HF_TOKEN=your_huggingface_token

The notebook will automatically log you in using this token.


How to Run

  1. Load the Model and Tokenizer
    The script downloads the Qwen3-32B model and applies 4-bit quantization with BitsAndBytesConfig for efficient memory usage.

  2. Prepare the Dataset

    • The notebook uses FreedomIntelligence/medical-o1-reasoning-SFT (first 500 samples).
    • It formats each example into an instruction-following prompt with step-by-step chain-of-thought reasoning.
  3. Fine-tuning

    • Fine-tuning is set up with PEFT (LoRA / Adapter Tuning style) to modify a small subset of model parameters.
    • TRL (Transformer Reinforcement Learning) is used to fine-tune efficiently.
  4. Push Fine-tuned Model

    • After training, the fine-tuned model and tokenizer are pushed back to your Hugging Face account.

Here is the training notebook: Fine_tuning_Qwen-3-32B

Model Configuration

  • Base Model: Qwen/Qwen3-32B
  • Quantization: 4-bit (NF4)
  • Training: PEFT + TRL
  • Dataset: 2000 examples from medical reasoning dataset

Notes

  • GPU Required: Make sure you have access to 1X A100s. Get it from RunPod for an hours. Training took only 50 minutes.
  • Environment: The notebook expects an environment where NVIDIA CUDA drivers are available (nvidia-smi check is included).
  • Memory Efficiency: 4-bit loading greatly reduces memory footprint.

Example Prompt Format

Below is an instruction that describes a task, paired with an input that provides further context. 
Write a response that appropriately completes the request. 
Before answering, think carefully about the question and create a step-by-step chain of thoughts to ensure a logical and accurate response.

### Instruction:
You are a medical expert with advanced knowledge in clinical reasoning, diagnostics, and treatment planning. 
Please answer the following medical question.

### Question:
{}

### Response:
<think>
{}
</think>
{}

Usage Script (not-tested)

from transformers import AutoTokenizer, AutoModelForCausalLM, BitsAndBytesConfig
from peft import PeftModel
import torch

# Base model (original model from Meta)
base_model_id = "Qwen/Qwen3-32B"

# Your fine-tuned LoRA adapter repository
lora_adapter_id = "kingabzpro/Qwen-3-32B-Medical-Reasoning"

# Load the model in 4-bit
bnb_config = BitsAndBytesConfig(
    load_in_4bit=True,
    bnb_4bit_use_double_quant=False,
    bnb_4bit_quant_type="nf4",
    bnb_4bit_compute_dtype=torch.bfloat16,
)

# Load base model
base_model = AutoModelForCausalLM.from_pretrained(
    base_model_id,
    device_map="auto",
    torch_dtype=torch.bfloat16,
    quantization_config=bnb_config,
    trust_remote_code=True,
)

# Attach the LoRA adapter
model = PeftModel.from_pretrained(
    base_model,
    lora_adapter_id,
    device_map="auto",
    trust_remote_code=True,
)

# Load tokenizer
tokenizer = AutoTokenizer.from_pretrained(base_model_id, trust_remote_code=True)

# Inference example
prompt = """Below is an instruction that describes a task, paired with an input that provides further context. 
Write a response that appropriately completes the request. 
Before answering, think carefully about the question and create a step-by-step chain of thoughts to ensure a logical and accurate response.

### Instruction:
You are a medical expert with advanced knowledge in clinical reasoning, diagnostics, and treatment planning. 
Please answer the following medical question.

### Question:
What is the initial management for a patient presenting with diabetic ketoacidosis (DKA)?

### Response:
<think>
"""

inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_new_tokens=1200)
response = tokenizer.decode(outputs[0], skip_special_tokens=True)

print(response)



Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм · transformers

Можно запустить

Подбираем GPU…

Класс архитектуры
Qwen3ForCausalLM
Ревизия весов
5dd4223

0 моделей