Downloads · 30 days
13
22% of all-time downloads
HollowMan6/GLM-5-NOOP-LoRA
GLM-5-NOOP-LoRA is a text generation model from HollowMan6. Use it when you need the model to write or continue text. It is set up for peft. The card lists the license as mit.
This repository contains an empty-initialized PEFT LoRA adapter for zai-org/GLM-5.
Downloads · 30 days
13
22% of all-time downloads
All-time downloads
58
Public
Repo size
7.7 GB
Likes
0
Public
Click a slice to open those files.
.safetensors7.7 GB · 100%
From the Hugging Face model README
This repository contains an empty-initialized PEFT LoRA adapter for zai-org/GLM-5.
It is intended for:
This adapter is initialized as a near no-op:
lora_A: Kaiming-uniformlora_B: zerosSo generation quality should be close to the base model before any fine-tuning.
zai-org/GLM-5This checkpoint was generated programmatically (not fine-tuned from data), targeting:
lm_head)gate_proj, up_proj, down_proj) and gate when availableNo training was performed.
This is an initialization-only adapter checkpoint.
No task evaluation metrics are reported for this adapter.
Expected behavior is close to the base model due to zero-initialized lora_B.
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
base = "zai-org/GLM-5"
adapter = "/path/to/this/adapter"
tokenizer = AutoTokenizer.from_pretrained(base, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(base, trust_remote_code=True)
model = PeftModel.from_pretrained(model, adapter)
from vllm import LLM, SamplingParams
from vllm.lora.request import LoRARequest
llm = LLM(
model="zai-org/GLM-5",
trust_remote_code=True,
enable_lora=True,
max_loras=1,
max_lora_rank=8, # set >= adapter rank
)
outputs = llm.generate(
["Hello!"],
SamplingParams(temperature=0.0, max_tokens=32),
lora_request=LoRARequest("empty-lora", 1, "/path/to/this/adapter"),
)
print(outputs[0].outputs[0].text)