File size: 1,778 Bytes
c702f83
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
---
language: en
tags:
  - medical
  - pediatrics
  - mobilebert
  - question-answering
license: apache-2.0
datasets:
  - custom
model-index:
  - name: MobileBERT Nelson Pediatrics
    results: []
---

# MobileBERT Fine-tuned on Nelson Textbook of Pediatrics

This model is a fine-tuned version of `google/mobilebert-uncased` trained on excerpts from the **Nelson Textbook of Pediatrics**. It is designed to serve as a lightweight, on-device capable medical assistant model for pediatric reference tasks.

## Intended Use

This model is intended for:

- Medical question answering (focused on pediatrics)
- Clinical decision support in low-resource environments
- Integration into apps like **Nelson-GPT** for fast inference

> **Note:** This model is for educational and experimental use only and should not replace professional medical advice.

## Training Details

- Base model: `mobilebert-uncased`
- Training framework: Transformers + PyTorch
- Dataset: Nelson Textbook (manually curated excerpts)
- Epochs: [insert]
- Learning rate: [insert]

## How to Use

```python
from transformers import AutoTokenizer, AutoModelForQuestionAnswering
import torch

tokenizer = AutoTokenizer.from_pretrained("drzeeIslam/mobilebert-nelson")
model = AutoModelForQuestionAnswering.from_pretrained("drzeeIslam/mobilebert-nelson")

question = "What is the treatment for nephrotic syndrome?"
context = "The first-line treatment for nephrotic syndrome in children is corticosteroid therapy..."

inputs = tokenizer(question, context, return_tensors="pt")
outputs = model(**inputs)

start = torch.argmax(outputs.start_logits)
end = torch.argmax(outputs.end_logits) + 1

answer = tokenizer.convert_tokens_to_string(tokenizer.convert_ids_to_tokens(inputs['input_ids'][0][start:end]))
print(answer)