Downloads · 30 days
27
7% of all-time downloads
prithivMLmods/Blaze.1-27B-Preview
Blaze.1-27B-Preview is a text generation model from prithivMLmods. 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.
Downloads · 30 days
27
7% of all-time downloads
All-time downloads
409
Public
Parameters
27.2B
54.5 GB on disk
Likes
1
Public
Click a slice to open those files.
.safetensors54.5 GB · 100%
From the Hugging Face model README

Blaze.1-27B-Preview is a Gemma 2-based, 27-billion-parameter model. Gemma is a family of lightweight, state-of-the-art open models from Google, built using the same research and technology that powers the Gemini models. These models are text-to-text, decoder-only large language models available in English, with open weights for both pre-trained and instruction-tuned variants. Gemma models are well-suited for a variety of text generation tasks, including question answering, summarization, and reasoning. Blaze.1-27B was fine-tuned on long-chain-of-thought reasoning synthetic datasets derived from models such as DeepSeek, Qwen, and OpenAI’s GPT-4.
Below we share some code snippets on how to get quickly started with running the model. First, install the Transformers library with:
pip install -U transformers
Then, copy the snippet from the section that is relevant for your usecase.
pipeline APIimport torch
from transformers import pipeline
pipe = pipeline(
"text-generation",
model="prithivMLmods/Blaze.1-27B-Preview",
model_kwargs={"torch_dtype": torch.bfloat16},
device="cuda", # replace with "mps" to run on a Mac device
)
messages = [
{"role": "user", "content": "Who are you? Please, answer in pirate-speak."},
]
outputs = pipe(messages, max_new_tokens=256)
assistant_response = outputs[0]["generated_text"][-1]["content"].strip()
print(assistant_response)
# Ahoy, matey! I be Gemma, a digital scallywag, a language-slingin' parrot of the digital seas. I be here to help ye with yer wordy woes, answer yer questions, and spin ye yarns of the digital world. So, what be yer pleasure, eh? 🦜
# pip install accelerate
from transformers import AutoTokenizer, AutoModelForCausalLM
import torch
tokenizer = AutoTokenizer.from_pretrained("prithivMLmods/Blaze.1-27B-Preview")
model = AutoModelForCausalLM.from_pretrained(
"prithivMLmods/Blaze.1-27B-Preview",
device_map="auto",
torch_dtype=torch.bfloat16,
)
input_text = "Write me a poem about Machine Learning."
input_ids = tokenizer(input_text, return_tensors="pt").to("cuda")
outputs = model.generate(**input_ids, max_new_tokens=32)
print(tokenizer.decode(outputs[0]))
You can ensure the correct chat template is applied by using tokenizer.apply_chat_template as follows:
messages = [
{"role": "user", "content": "Write me a poem about Machine Learning."},
]
input_ids = tokenizer.apply_chat_template(messages, return_tensors="pt", return_dict=True).to("cuda")
outputs = model.generate(**input_ids, max_new_tokens=256)
print(tokenizer.decode(outputs[0]))
<a name="precisions"></a>
The native weights of this model were exported in bfloat16 precision.
You can also use float32 if you skip the dtype, but no precision increase will occur (model weights will just be upcasted to float32). See examples below.
torch.float32# pip install accelerate
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("prithivMLmods/Blaze.1-27B-Preview")
model = AutoModelForCausalLM.from_pretrained(
"prithivMLmods/Blaze.1-27B-Preview",
device_map="auto",
)
input_text = "Write me a poem about Machine Learning."
input_ids = tokenizer(input_text, return_tensors="pt").to("cuda")
outputs = model.generate(**input_ids, max_new_tokens=32)
print(tokenizer.decode(outputs[0]))
Blaze.1-27B-Preview is designed for advanced text generation tasks requiring logical reasoning, complex problem-solving, and long-form content generation. Its primary use cases include: