Views
No views yet
deepseek-ai/DeepSeek-R1-Distill-Llama-8B, specifically designed to enhance medical reasoning through Chain-of-Thought (CoT) prompting. It is trained using QLoRA with Unsloth optimization, allowing efficient fine-tuning on limited hardware resources.deepseek-ai/DeepSeek-R1-Distill-Llama-8Bmedical-o1-reasoning-SFT)1from transformers import AutoModelForCausalLM, AutoTokenizer
2
3repo_name = "your-huggingface-username/DeepSeek-R1-Medical-CoT"
4
5tokenizer = AutoTokenizer.from_pretrained(repo_name)
6model = AutoModelForCausalLM.from_pretrained(repo_name)
7
8model.eval()1prompt = "What are the early symptoms of diabetes?"
2inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
3
4with torch.no_grad():
5 output = model.generate(**inputs, max_new_tokens=200)
6
7response = tokenizer.decode(output[0], skip_special_tokens=True)
8print("Model Response:", response)