Downloads · 30 days
4
9% of all-time downloads
Willow-yue/Qwen2.5-ECG-7B-Finetuned
Qwen2.5-ECG-7B-Finetuned is a machine learning model from Willow-yue. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
from transformers import AutoModelForCausalLM, AutoTokenizer import torch
Downloads · 30 days
4
9% of all-time downloads
All-time downloads
46
Public
Parameters
7.6B
15.2 GB on disk
Likes
1
Public
Click a slice to open those files.
.safetensors15.2 GB · 100%
From the Hugging Face model README
from transformers import AutoModelForCausalLM, AutoTokenizer import torch
model_id = "Willow-yue/Qwen2.5-ECG-7B-Finetuned"
print("正在从 HuggingFace 下载并加载模型...") tokenizer = AutoTokenizer.from_pretrained(model_id) model = AutoModelForCausalLM.from_pretrained( model_id, device_map="auto", # 自动调用显卡 torch_dtype=torch.bfloat16 )
text = "Sinus tachycardia. Old inferior myocardial infarction." prompt = f"Extract structured findings from the ECG report.\nInput: {text}\nResponse:"
inputs = tokenizer(prompt, return_tensors="pt").to(model.device) with torch.no_grad(): outputs = model.generate(**inputs, max_new_tokens=512, temperature=0.01)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))