Downloads · 30 days
0
omniamagdy/gptneo-medical-125m
gptneo-medical-125m is a text generation model from omniamagdy. Use it when you need the model to write or continue text. It is set up for peft. The card lists the license as mit.
This model is an instruction-conditioned medical text generator built on top of EleutherAI/gpt-neo-125M.
Downloads · 30 days
0
Access
Public
Updated Feb 26, 2026
Parameters
125M
1 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors501 MB · 99%
From the Hugging Face model README
This model is an instruction-conditioned medical text generator built on top of EleutherAI/gpt-neo-125M.
It was fine-tuned using LoRA (Low-Rank Adaptation) with prompt-formatted biomedical abstracts from the PubMed Summarization dataset.
Unlike standard fine-tuned models, this version was trained using structured prompts to improve domain-specific generation quality.
Compared to the base fine-tuned version:
This model is designed for:
⚠️ This model is NOT intended for clinical use.
| Item | Value |
|---|---|
| Base Model | EleutherAI/gpt-neo-125M |
| Dataset | PubMed Summarization |
| Training Method | LoRA |
| Prompt Conditioning | Yes |
| Context Length | 512 |
| LoRA Rank | 16 |
| Task | Instruction-based Medical Text Generation |
Training utilized biomedical abstracts from:
https://huggingface.co/datasets/ccdv/pubmed-summarization
Prompt formatting was applied:
Medical report: <Abstract text>
This improves alignment with generation tasks rather than summarization.
This enables:
LoRA Paper: https://arxiv.org/abs/2106.09685
Users must verify outputs using trusted medical sources.
Allowed Uses:
✔️ Research
✔️ Academic projects
✔️ NLP experimentation
Disallowed Uses:
❌ Clinical decision support
❌ Medical diagnosis
❌ Treatment planning
❌ Emergency healthcare guidance
This model does not replace medical professionals.
from transformers import AutoTokenizer, AutoModelForCausalLM
model = AutoModelForCausalLM.from_pretrained("omniamagdy/gptneo-medical-125m")
tokenizer = AutoTokenizer.from_pretrained("omniamagdy/gptneo-medical-125m")
prompt = "Medical report:\nExplain hypertension"
inputs = tokenizer(prompt, return_tensors="pt")
outputs = model.generate(
**inputs,
max_new_tokens=120,
temperature=0.6,
top_p=0.9,
repetition_penalty=1.2
)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))