Views
No views yet

gemma-4-26B-A4B-Heretic-Stable is an optimized release built on top of huihui-ai/Huihui-gemma-4-26B-A4B-it-abliterated. This version focuses on updated weight sharding, improved repository structure, and compatibility with the latest Transformers versions, while preserving the behavior and capabilities of the original model. The result is a powerful 26B parameter language model optimized for efficient deployment, inference stability, and modern tooling support.
[!IMPORTANT] This model is intended for research and learning purposes only. Any content generated by this model is used at the user’s own risk. The authors and hosting page disclaim any liability for outputs produced by this model. Users are responsible for ensuring safe, ethical, and lawful usage.
1pip install transformers==5.9.0
2# or
3pip install git+https://github.com/huggingface/transformers.git1from transformers import Gemma4ForConditionalGeneration, AutoProcessor
2import torch
3
4model = Gemma4ForConditionalGeneration.from_pretrained(
5 "prithivMLmods/gemma-4-26B-A4B-Heretic-Stable",
6 torch_dtype="auto",
7 device_map="auto"
8)
9
10processor = AutoProcessor.from_pretrained(
11 "prithivMLmods/gemma-4-26B-A4B-Heretic-Stable"
12)
13
14messages = [
15 {
16 "role": "user",
17 "content": [
18 {"type": "text", "text": "Explain how transformer models work in simple terms."}
19 ],
20 }
21]
22
23text = processor.apply_chat_template(
24 messages, tokenize=False, add_generation_prompt=True
25)
26
27inputs = processor(
28 text=[text],
29 padding=True,
30 return_tensors="pt"
31).to("cuda")
32
33generated_ids = model.generate(**inputs, max_new_tokens=256)
34
35generated_ids_trimmed = [
36 out_ids[len(in_ids):] for in_ids, out_ids in zip(inputs.input_ids, generated_ids)
37]
38
39output_text = processor.batch_decode(
40 generated_ids_trimmed,
41 skip_special_tokens=True,
42 clean_up_tokenization_spaces=False
43)
44
45print(output_text)Important Note: This model inherits the behavior and characteristics of its base model.