Downloads · 30 days
7
33% of all-time downloads
likith123/Gemma_2B_Medium_20k_FT
Gemma_2B_Medium_20k_FT is a text generation model from likith123. Use it when you need the model to write or continue text. It is set up for keras. The card lists the license as mit.
This repository contains the code and model for fine-tuning the Gemma 2b Instruction model using a dataset of 20k medium articles. The fine-tuned model is designed to generate responses based on input prompts related…
Downloads · 30 days
7
33% of all-time downloads
All-time downloads
21
Public
Repo size
10.3 GB
Likes
1
Public
Click a slice to open those files.
.keras10.2 GB · 99%
From the Hugging Face model README
This repository contains the code and model for fine-tuning the Gemma 2b Instruction model using a dataset of 20k medium articles. The fine-tuned model is designed to generate responses based on input prompts related to instructional queries in English.
The Gemma 2b Instruction Fine-Tuned Model was fine-tuned using the following process:
Ensure you have the necessary dependencies installed:
pip install keras keras-nlp
To use the fine-tuned model for inference, follow these steps:
Download the Model:
version_finetuned.keras can be downloaded from the provided link.Inference:
from keras.models import load_model
# Load the saved model
loaded_model = load_model("version_finetuned.keras")
instruction = "How to code in python and c#"
response = ""
# Create the input prompt
prompt = f"Instruction:\n{instruction}\n\nResponse:\n{response}"
# Generate inference using the loaded model
inference_result = loaded_model.generate(prompt, max_length=1024)
# Print or use the generated response
print(inference_result)
For more information about the model, check out its model card on Hugging Face Model Hub.
This project is licensed under the MIT License.