Views
No views yet
1from unsloth import FastLanguageModel
2
3model, tokenizer = FastLanguageModel.from_pretrained(
4 model_name="3rdSon/clinical-trial-lora-llama3-8b",
5 max_seq_length=512,
6 dtype=None,
7 load_in_4bit=True,
8)
9
10# Enable inference mode
11FastLanguageModel.for_inference(model)
12
13# Make a prediction
14prompt = """You are evaluating clinical trial outcomes. Based on the question below, predict whether the outcome will be YES (1) or NO (0).
15
16Question: Will Eli Lilly's Phase 3 trial for obesity drug meet primary endpoints by Q4 2025?
17
18Respond with only a single digit: 0 or 1.
19Answer:"""
20
21inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
22outputs = model.generate(**inputs, max_new_tokens=10)
23print(tokenizer.decode(outputs[0], skip_special_tokens=True))| Metric | Baseline | Fine-Tuned | Improvement |
|---|---|---|---|
| Accuracy | 56.3% | 73.3% | +17.0pp |
1@misc{nnaji2025clinical_trial_lora,
2 author = {Victory Nnaji},
3 title = {Clinical Trial Prediction LoRA for Llama-3-8B},
4 year = {2025},
5 publisher = {Hugging Face},
6 howpublished = {\url{https://huggingface.co/3rdSon/clinical-trial-lora-llama3-8b}}
7}