玩模型开放模型 · 清晰来源 · 自主选择
返回模型目录
llmfan46 /

GLM-Z1-32B-0414-uncensored-heretic-v1

HF 源站

llmfan46/GLM-Z1-32B-0414-uncensored-heretic-v1 is an uncensored open-source model hosted on Hugging Face.

Text GenerationsafetensorsChineseEnglishMultilingualLicense: mit32Btransformersglm4hereticuncensoreddecensoredabliteratedaraconversational
README.md说明 / 使用方法

license: mit language:

  • zh
  • en pipeline_tag: text-generation library_name: transformers tags:
  • heretic
  • uncensored
  • decensored
  • abliterated
  • ara base_model:
  • zai-org/GLM-Z1-32B-0414


85% fewer refusals (14/100 Uncensored vs 94/100 Original) while preserving model quality (0.0015 KL divergence).

❤️ Support My Work

Creating these models takes significant time, work and compute. If you find them useful consider supporting me:

image/png

PlatformLinkWhat you get
🎉 PatreonMonthly supportPriority model requests
☕ Ko-fiOne-time tipMy eternal gratitude

Your help will motivate me and would go into further improving my workflow and coverings fees for storage, compute and may even help uncensoring bigger model with rental Cloud GPUs.


This is a decensored version of zai-org/GLM-Z1-32B-0414, made using Heretic v1.2.0 with the Arbitrary-Rank Ablation (ARA) method

Abliteration parameters

ParameterValue
start_layer_index24
end_layer_index43
preserve_good_behavior_weight0.5806
steer_bad_behavior_weight0.0001
overcorrect_relative_weight1.2502
neighbor_count3

Targeted components

  • attn.o_proj

Performance

MetricThis modelOriginal model (zai-org/GLM-Z1-32B-0414)
KL divergence0.00150 (by definition)
Refusals✅ 14/100❌ 94/100

PIQA test results with batch size 128:

Original:

TasksVersionFiltern-shotMetricValueStderr
piqa1none0acc↑0.8156±0.0090
none0acc_norm↑0.8210±0.0089

Heretic:

TasksVersionFiltern-shotMetricValueStderr
piqa1none0acc↑0.8123±0.0091
none0acc_norm↑0.8221±0.0089

Lower refusals indicate fewer content restrictions, while lower KL divergence indicates more closeness to the original model's baseline. Higher refusals cause more rejections, objections, pushbacks, lecturing, censorship, softening and deflections. PIQA (Physical Intuition Question Answering) a ~1,800 questions tests common-sense understanding of how the physical world works with benchmark scores to measure physical reasoning ability. The Heretic model's acc and acc_norm scores closer to the original model's indicate better capability preservation, a big decrease in acc and acc_norm in the Heretic model compared to Original model's results means a big decrease in the Hereticated model capabilities. acc measures raw accuracy (which answer gets higher probability), while acc_norm measures length-normalized accuracy (corrects for answer length bias). For this purpose, acc_norm matters more because longer answers naturally have lower probabilities (more tokens = more chances to lose probability). Without normalization, models favor shorter answers unfairly. acc_norm divides by answer length to correct this.

MMLU test results with batch size 16:

Original:

TasksVersionFiltern-shotMetricValueStderr
mmlu2noneacc↑0.7001±0.0036
- humanities2noneacc↑0.6193±0.0066
- formal_logic1none0acc↑0.6111±0.0436
- high_school_european_history1none0acc↑0.8182±0.0301
- high_school_us_history1none0acc↑0.8873±0.0222
- high_school_world_history1none0acc↑0.8608±0.0225
- international_law1none0acc↑0.8017±0.0364
- jurisprudence1none0acc↑0.8056±0.0383
- logical_fallacies1none0acc↑0.8037±0.0312
- moral_disputes1none0acc↑0.6965±0.0248
- moral_scenarios1none0acc↑0.3844±0.0163
- philosophy1none0acc↑0.7106±0.0258
- prehistory1none0acc↑0.7870±0.0228
- professional_law1none0acc↑0.5163±0.0128
- world_religions1none0acc↑0.8713±0.0257
- other2noneacc↑0.7580±0.0073
- business_ethics1none0acc↑0.7700±0.0423
- clinical_knowledge1none0acc↑0.8000±0.0246
- college_medicine1none0acc↑0.6879±0.0353
- global_facts1none0acc↑0.3700±0.0485
- human_aging1none0acc↑0.7399±0.0294
- management1none0acc↑0.8252±0.0376
- marketing1none0acc↑0.8889±0.0206
- medical_genetics1none0acc↑0.8300±0.0378
- miscellaneous1none0acc↑0.8659±0.0122
- nutrition1none0acc↑0.7810±0.0237
- professional_accounting1none0acc↑0.5567±0.0296
- professional_medicine1none0acc↑0.7794±0.0252
- virology1none0acc↑0.5000±0.0389
- social sciences2noneacc↑0.8021±0.0070
- econometrics1none0acc↑0.5526±0.0468
- high_school_geography1none0acc↑0.8384±0.0262
- high_school_government_and_politics1none0acc↑0.8912±0.0225
- high_school_macroeconomics1none0acc↑0.7949±0.0205
- high_school_microeconomics1none0acc↑0.8992±0.0196
- high_school_psychology1none0acc↑0.8844±0.0137
- human_sexuality1none0acc↑0.7786±0.0364
- professional_psychology1none0acc↑0.7320±0.0179
- public_relations1none0acc↑0.7091±0.0435
- security_studies1none0acc↑0.7184±0.0288
- sociology1none0acc↑0.8607±0.0245
- us_foreign_policy1none0acc↑0.8400±0.0368
- stem2noneacc↑0.6641±0.0081
- abstract_algebra1none0acc↑0.5000±0.0503
- anatomy1none0acc↑0.6741±0.0405
- astronomy1none0acc↑0.8158±0.0315
- college_biology1none0acc↑0.8750±0.0277
- college_chemistry1none0acc↑0.5300±0.0502
- college_computer_science1none0acc↑0.6400±0.0482
- college_mathematics1none0acc↑0.5200±0.0502
- college_physics1none0acc↑0.5196±0.0497
- computer_security1none0acc↑0.7500±0.0435
- conceptual_physics1none0acc↑0.7489±0.0283
- electrical_engineering1none0acc↑0.7310±0.0370
- elementary_mathematics1none0acc↑0.5767±0.0254
- high_school_biology1none0acc↑0.8516±0.0202
- high_school_chemistry1none0acc↑0.6601±0.0333
- high_school_computer_science1none0acc↑0.7400±0.0441
- high_school_mathematics1none0acc↑0.4556±0.0304
- high_school_physics1none0acc↑0.6225±0.0396
- high_school_statistics1none0acc↑0.6991±0.0313
- machine_learning1none0acc↑0.5893±0.0467
GroupsVersionFiltern-shotMetricValueStderr
mmlu2noneacc↑0.7001±0.0036
- humanities2noneacc↑0.6193±0.0066
- other2noneacc↑0.7580±0.0073
- social sciences2noneacc↑0.8021±0.0070
- stem2noneacc↑0.6641±0.0081

Heretic:

TasksVersionFiltern-shotMetricValueStderr
mmlu2noneacc↑0.6703±0.0037
- humanities2noneacc↑0.5747±0.0067
- formal_logic1none0acc↑0.5952±0.0439
- high_school_european_history1none0acc↑0.7818±0.0323
- high_school_us_history1none0acc↑0.8775±0.0230
- high_school_world_history1none0acc↑0.8143±0.0253
- international_law1none0acc↑0.7355±0.0403
- jurisprudence1none0acc↑0.7685±0.0408
- logical_fallacies1none0acc↑0.7853±0.0323
- moral_disputes1none0acc↑0.6590±0.0255
- moral_scenarios1none0acc↑0.3207±0.0156
- philosophy1none0acc↑0.6752±0.0266
- prehistory1none0acc↑0.7747±0.0232
- professional_law1none0acc↑0.4602±0.0127
- world_religions1none0acc↑0.8538±0.0271
- other2noneacc↑0.7448±0.0075
- business_ethics1none0acc↑0.7100±0.0456
- clinical_knowledge1none0acc↑0.7660±0.0261
- college_medicine1none0acc↑0.6705±0.0358
- global_facts1none0acc↑0.4000±0.0492
- human_aging1none0acc↑0.7399±0.0294
- management1none0acc↑0.7961±0.0399
- marketing1none0acc↑0.8932±0.0202
- medical_genetics1none0acc↑0.8400±0.0368
- miscellaneous1none0acc↑0.8582±0.0125
- nutrition1none0acc↑0.7614±0.0244
- professional_accounting1none0acc↑0.5177±0.0298
- professional_medicine1none0acc↑0.7610±0.0259
- virology1none0acc↑0.5181±0.0389
- social sciences2noneacc↑0.7719±0.0074
- econometrics1none0acc↑0.5000±0.0470
- high_school_geography1none0acc↑0.8232±0.0272
- high_school_government_and_politics1none0acc↑0.8964±0.0220
- high_school_macroeconomics1none0acc↑0.7538±0.0218
- high_school_microeconomics1none0acc↑0.8613±0.0224
- high_school_psychology1none0acc↑0.8716±0.0143
- human_sexuality1none0acc↑0.7786±0.0364
- professional_psychology1none0acc↑0.6650±0.0191
- public_relations1none0acc↑0.6545±0.0455
- security_studies1none0acc↑0.7061±0.0292
- sociology1none0acc↑0.8507±0.0252
- us_foreign_policy1none0acc↑0.8300±0.0378
- stem2noneacc↑0.6403±0.0083
- abstract_algebra1none0acc↑0.4400±0.0499
- anatomy1none0acc↑0.6963±0.0397
- astronomy1none0acc↑0.7763±0.0339
- college_biology1none0acc↑0.8472±0.0301
- college_chemistry1none0acc↑0.5300±0.0502
- college_computer_science1none0acc↑0.6000±0.0492
- college_mathematics1none0acc↑0.5300±0.0502
- college_physics1none0acc↑0.5294±0.0497
- computer_security1none0acc↑0.7100±0.0456
- conceptual_physics1none0acc↑0.7489±0.0283
- electrical_engineering1none0acc↑0.6897±0.0386
- elementary_mathematics1none0acc↑0.5926±0.0253
- high_school_biology1none0acc↑0.8161±0.0220
- high_school_chemistry1none0acc↑0.6059±0.0344
- high_school_computer_science1none0acc↑0.7400±0.0441
- high_school_mathematics1none0acc↑0.4296±0.0302
- high_school_physics1none0acc↑0.5563±0.0406
- high_school_statistics1none0acc↑0.6389±0.0328
- machine_learning1none0acc↑0.5536±0.0472
GroupsVersionFiltern-shotMetricValueStderr
mmlu2noneacc↑0.6703±0.0037
- humanities2noneacc↑0.5747±0.0067
- other2noneacc↑0.7448±0.0075
- social sciences2noneacc↑0.7719±0.0074
- stem2noneacc↑0.6403±0.0083

MMLU - Massive Multitask Language Understanding, ~14,000 multiple-choice questions across 57 subjects (math, history, law, medicine, etc.).


GLM-4-Z1-32B-0414

Introduction

The GLM family welcomes a new generation of open-source models, the GLM-4-32B-0414 series, featuring 32 billion parameters. Its performance is comparable to OpenAI's GPT series and DeepSeek's V3/R1 series, and it supports very user-friendly local deployment features. GLM-4-32B-Base-0414 was pre-trained on 15T of high-quality data, including a large amount of reasoning-type synthetic data, laying the foundation for subsequent reinforcement learning extensions. In the post-training stage, in addition to human preference alignment for dialogue scenarios, we also enhanced the model's performance in instruction following, engineering code, and function calling using techniques such as rejection sampling and reinforcement learning, strengthening the atomic capabilities required for agent tasks. GLM-4-32B-0414 achieves good results in areas such as engineering code, Artifact generation, function calling, search-based Q&A, and report generation. Some benchmarks even rival larger models like GPT-4o and DeepSeek-V3-0324 (671B).

GLM-Z1-32B-0414 is a reasoning model with deep thinking capabilities. This was developed based on GLM-4-32B-0414 through cold start and extended reinforcement learning, as well as further training of the model on tasks involving mathematics, code, and logic. Compared to the base model, GLM-Z1-32B-0414 significantly improves mathematical abilities and the capability to solve complex tasks. During the training process, we also introduced general reinforcement learning based on pairwise ranking feedback, further enhancing the model's general capabilities.

GLM-Z1-Rumination-32B-0414 is a deep reasoning model with rumination capabilities (benchmarked against OpenAI's Deep Research). Unlike typical deep thinking models, the rumination model employs longer periods of deep thought to solve more open-ended and complex problems (e.g., writing a comparative analysis of AI development in two cities and their future development plans). The rumination model integrates search tools during its deep thinking process to handle complex tasks and is trained by utilizing multiple rule-based rewards to guide and extend end-to-end reinforcement learning. Z1-Rumination shows significant improvements in research-style writing and complex retrieval tasks.

Finally, GLM-Z1-9B-0414 is a surprise. We employed the aforementioned series of techniques to train a 9B small-sized model that maintains the open-source tradition. Despite its smaller scale, GLM-Z1-9B-0414 still exhibits excellent capabilities in mathematical reasoning and general tasks. Its overall performance is already at a leading level among open-source models of the same size. Especially in resource-constrained scenarios, this model achieves an excellent balance between efficiency and effectiveness, providing a powerful option for users seeking lightweight deployment.

Performance

Model Usage Guidelines

I. Sampling Parameters

ParameterRecommended ValueDescription
temperature0.6Balances creativity and stability
top_p0.95Cumulative probability threshold for sampling
top_k40Filters out rare tokens while maintaining diversity
max_new_tokens30000Leaves enough tokens for thinking

II. Enforced Thinking

  • Add <think>\n to the first line: Ensures the model thinks before responding
  • When using chat_template.jinja, the prompt is automatically injected to enforce this behavior

III. Dialogue History Trimming

  • Retain only the final user-visible reply.
    Hidden thinking content should not be saved to history to reduce interference—this is already implemented in chat_template.jinja

IV. Handling Long Contexts (YaRN)

  • When input length exceeds 8,192 tokens, consider enabling YaRN (Rope Scaling)

  • In supported frameworks, add the following snippet to config.json:

    "rope_scaling": {
      "type": "yarn",
      "factor": 4.0,
      "original_max_position_embeddings": 32768
    }
    
  • Static YaRN applies uniformly to all text. It may slightly degrade performance on short texts, so enable as needed.

Inference Code

Make Sure Using transforemrs>=4.51.3.

from transformers import AutoModelForCausalLM, AutoTokenizer

MODEL_PATH = "THUDM/GLM-4-Z1-32B-0414"

tokenizer = AutoTokenizer.from_pretrained(MODEL_PATH)
model = AutoModelForCausalLM.from_pretrained(MODEL_PATH, device_map="auto")

message = [{"role": "user", "content": "Let a, b be positive real numbers such that ab = a + b + 3. Determine the range of possible values for a + b."}]

inputs = tokenizer.apply_chat_template(
    message,
    return_tensors="pt",
    add_generation_prompt=True,
    return_dict=True,
).to(model.device)

generate_kwargs = {
    "input_ids": inputs["input_ids"],
    "attention_mask": inputs["attention_mask"],
    "max_new_tokens": 4096,
    "do_sample": False,
}
out = model.generate(**generate_kwargs)
print(tokenizer.decode(out[0][inputs["input_ids"].shape[1]:], skip_special_tokens=True))

Citations

If you find our work useful, please consider citing the following paper.

@misc{glm2024chatglm,
      title={ChatGLM: A Family of Large Language Models from GLM-130B to GLM-4 All Tools}, 
      author={Team GLM and Aohan Zeng and Bin Xu and Bowen Wang and Chenhui Zhang and Da Yin and Diego Rojas and Guanyu Feng and Hanlin Zhao and Hanyu Lai and Hao Yu and Hongning Wang and Jiadai Sun and Jiajie Zhang and Jiale Cheng and Jiayi Gui and Jie Tang and Jing Zhang and Juanzi Li and Lei Zhao and Lindong Wu and Lucen Zhong and Mingdao Liu and Minlie Huang and Peng Zhang and Qinkai Zheng and Rui Lu and Shuaiqi Duan and Shudan Zhang and Shulin Cao and Shuxun Yang and Weng Lam Tam and Wenyi Zhao and Xiao Liu and Xiao Xia and Xiaohan Zhang and Xiaotao Gu and Xin Lv and Xinghan Liu and Xinyi Liu and Xinyue Yang and Xixuan Song and Xunkai Zhang and Yifan An and Yifan Xu and Yilin Niu and Yuantao Yang and Yueyan Li and Yushi Bai and Yuxiao Dong and Zehan Qi and Zhaoyu Wang and Zhen Yang and Zhengxiao Du and Zhenyu Hou and Zihan Wang},
      year={2024},
      eprint={2406.12793},
      archivePrefix={arXiv},
      primaryClass={id='cs.CL' full_name='Computation and Language' is_active=True alt_name='cmp-lg' in_archive='cs' is_general=False description='Covers natural language processing. Roughly includes material in ACM Subject Class I.2.7. Note that work on artificial languages (programming languages, logics, formal systems) that does not explicitly address natural-language issues broadly construed (natural-language processing, computational linguistics, speech, text retrieval, etc.) is not appropriate for this area.'}
}
HUGGING FACE

上游数据

HF 下载量31
HF 点赞量0

HF 下载量为源站最近 30 天统计,与本站点击分开。

SITE STATS

本站统计

下载点击—
请求数—
匿名去重—最近 7 天—

本站下载量记录按钮点击,不代表下载完成;短时连点会去重。

来源与版本

作者
llmfan46
最近更新
2026/04/02
最新创建
2026/04/02
HF 趋势
未知
数据快照
2026/09/16
版本
未知
许可证
mit