Downloads · 30 days
98
16% of all-time downloads
rautaditya/gemma-2-2b-dolly-sft
gemma-2-2b-dolly-sft is a text generation model from rautaditya. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as apache-2.0.
This model is a supervised fine-tuned (SFT) version of Google's Gemma 2 (2B), trained using the databricks/databricks-dolly-15k dataset to enhance instruction-following and conversational capabilities.
Downloads · 30 days
98
16% of all-time downloads
All-time downloads
611
Public
Parameters
2.6B
5.3 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors5.2 GB · 99%
From the Hugging Face model README
gemma-2-2b-dolly-sftThis model is a supervised fine-tuned (SFT) version of Google's Gemma 2 (2B), trained using the databricks/databricks-dolly-15k dataset to enhance instruction-following and conversational capabilities.
This model is intended for general-purpose instruction following, summarization, creative writing, open-ended question answering, and conversational chat interactions.
The model is not intended for high-stakes medical, legal, financial advice, or automated critical decision-making without human oversight. It should not be used to generate malicious, harmful, or abusive content.
Like all Large Language Models, gemma-2-2b-dolly-sft may exhibit biases inherited from its base model and training data (databricks-dolly-15k). It can occasionally generate inaccurate or "hallucinated" responses.
Users should employ appropriate safety filters and guardrails when deploying this model in public-facing applications.
Use the code below to load and run inference with the model using the transformers library:
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "rautaditya/gemma-2-2b-dolly-sft"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
model_id,
torch_dtype=torch.bfloat16,
device_map="auto"
)
input_text = "Explain the concept of compound interest in simple terms."
inputs = tokenizer(input_text, return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_new_tokens=256)
print(tokenizer.decode(outputs, skip_special_tokens=True))