Downloads · 30 days
24
9% of all-time downloads
rodrigomt/gama-12b
gama-12b is a text generation model from rodrigomt. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as gemma.
gama-12b is a 12-billion parameter language model created through the strategic merge of multiple specialized models. This model combines the capabilities of different architectures to offer a more robust and versatil…
Downloads · 30 days
24
9% of all-time downloads
All-time downloads
272
Public
Parameters
12.2B
24.4 GB on disk
Likes
2
Public
Click a slice to open those files.
.safetensors24.4 GB · 100%
From the Hugging Face model README
gama-12b is a 12-billion parameter language model created through the strategic merge of multiple specialized models. This model combines the capabilities of different architectures to offer a more robust and versatile conversational experience.
This model was developed using the DARE TIES (Drop And REscale with Ties-Elimination) technique, an advanced model merging methodology that allows for the efficient combination of different specializations into a single cohesive model.
gama-12b is the result of merging the following models:
The merge was performed using LazyMergekit, a tool that facilitates the process of merging language models.
models:
- model: soob3123/amoral-gemma3-12B-v2-qat
parameters:
density: 0.6
weight: 0.33
- model: allura-org/Gemma-3-Glitter-12B
parameters:
density: 0.6
weight: 0.33
- model: soob3123/Veiled-Calla-12B
parameters:
density: 0.6
weight: 0.34
merge_method: dare_ties
base_model: unsloth/gemma-3-12b-it-qat
parameters:
normalize: true
int8_mask: true
device: auto
dtype: float16
pip install -qU transformers accelerate torch
from transformers import AutoTokenizer, AutoModelForCausalLM
import transformers
import torch
# Model configuration
model_name = "rodrigomt/gama-12b"
# Load tokenizer and model
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(
model_name,
torch_dtype=torch.float16,
device_map="auto",
trust_remote_code=True
)
# Prepare the message
messages = [
{"role": "user", "content": "What is a large language model?"}
]
# Apply chat template
prompt = tokenizer.apply_chat_template(
messages,
tokenize=False,
add_generation_prompt=True
)
# Pipeline configuration
pipeline = transformers.pipeline(
"text-generation",
model=model,
tokenizer=tokenizer,
torch_dtype=torch.float16,
device_map="auto",
)
# Text generation
outputs = pipeline(
prompt,
max_new_tokens=256,
do_sample=True,
temperature=0.7,
top_k=50,
top_p=0.95,
repetition_penalty=1.1
)
print(outputs[0]["generated_text"])
# For more granular control
inputs = tokenizer.encode(prompt, return_tensors="pt")
attention_mask = inputs.ne(tokenizer.pad_token_id)
with torch.no_grad():
outputs = model.generate(
inputs,
attention_mask=attention_mask,
max_new_tokens=256,
do_sample=True,
temperature=0.7,
top_k=50,
top_p=0.95,
repetition_penalty=1.1,
pad_token_id=tokenizer.eos_token_id
)
response = tokenizer.decode(outputs[0], skip_special_tokens=True)
print(response)
This model is licensed under the Gemma License.