Downloads · 30 days
10
6% of all-time downloads
LaZeAsh/gemma-2b-lahacks
gemma-2b-lahacks is a machine learning model from LaZeAsh. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for peft. The card lists the license as gemma.
This model is a fine-tuned version of google/gemma-2b-it. It achieves the following results on the evaluation set: - Loss: 2.3061
Downloads · 30 days
10
6% of all-time downloads
All-time downloads
179
Public
Parameters
2.5B
10.8 GB on disk
Likes
2
Public
Click a slice to open those files.
.safetensors5.2 GB · 100%
From the Hugging Face model README
This model is a fine-tuned version of google/gemma-2b-it. It achieves the following results on the evaluation set:
This model was fine-tuned during LAHacks 2024, the intention of this model is to be able to diagnose a patient appropratiely based on the information in their previous medical records, current symptoms, age, sex, and more.
Code inference sample:
from peft import PeftModel, PeftConfig
from transformers import AutoModelForCausalLM, AutoTokenizer
config = PeftConfig.from_pretrained("LaZeAsh/gemma-2b-lahacks")
model = AutoModelForCausalLM.from_pretrained("google/gemma-2b-it")
model = PeftModel.from_pretrained(model, "LaZeAsh/gemma-2b-lahacks")
tokenizer = AutoTokenizer.from_pretrained("google/gemma-2b-it")
prompt = "I feel cold I most likely have a "
input_ids = tokenizer.encode(prompt, return_tensors = 'pt')
output = model.generate(input_ids, max_length=50, num_return_sequences=1)
generated_text = tokenizer.decode(output[0], skip_special_tokens=True)
print(generated_text)
Uses: To use Artificial Intelligence technology to diagnose patient based off of multiple parameters ranging from their age to their medical record.
Limitation: There's a highly likelyhood that the model will NOT be great at diagnosing it's users, the amount of time it took to fine-tune this model limited how much data we could train it on. With more time a more accurate model would be expected.
The model was trained on data from the research paper 'A New Dataset For Automatic Medical Diagnosis' by Arsène Fansi Tchango, Rishab Goel, Zhi Wen, Julien Martel, Joumana Ghosn. The 'release_train_patients.csv' dataset was reduced from it's original 1.3 million rows of data to a mere 500-1000 rows of data. This was due to the time it took to fine-tune a model which depended on how big the dataset provided was.
The fine-tuning took MULTIPLE, and I mean MULTIPLE tries. Sometimes the dataset provided was very big so the kernel had to be restarted multiple times. Additionally, the model was tuned on the default data that Intel offers in their guide to fine-tune a gemma model.
The following hyperparameters were used during training:
| Training Loss | Epoch | Step | Validation Loss |
|---|---|---|---|
| 3.3089 | 3.5714 | 100 | 2.3061 |