Downloads · 30 days
50
3% of all-time downloads
yasserrmd/GLM4.7-Distill-LFM2.5-1.2B
GLM4.7-Distill-LFM2.5-1.2B is a text generation model from yasserrmd. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as apache-2.0.
Downloads · 30 days
50
3% of all-time downloads
All-time downloads
1.9K
Public
Parameters
1.2B
2.3 GB on disk
Likes
11
Public
Click a slice to open those files.
.safetensors2.3 GB · 100%
From the Hugging Face model README
GLM4.7-Distill-LFM2.5-1.2B is a 1.2B-parameter instruction-following language model obtained via offline distillation from GLM-4.7 into the Liquid AI LFM2 architecture.
The model is designed to be:
This model does not include chain-of-thought reasoning and is optimized for final-answer quality rather than verbose explanations.
This model was trained using offline distillation, where instruction-response pairs generated by GLM-4.7 were combined with high-quality public instruction datasets.
The teacher model was not used during training or inference, and no teacher weights or logits are included.
Training focused on:
The following datasets were sampled and combined:
These were augmented with GLM-4.7–generated instruction responses, with explicit avoidance of chain-of-thought reasoning.
This model is well suited for:
Like other compact distilled models, this model may:
For critical reasoning, verification layers or external tools are recommended.
If you use this model in research or applications, please acknowledge:
from transformers import AutoModelForCausalLM, AutoTokenizer, TextStreamer
model_id = "yasserrmd/GLM4.7-Distill-LFM2.5-1.2B"
model = AutoModelForCausalLM.from_pretrained(
model_id,
device_map="auto",
dtype="bfloat16",
# attn_implementation="flash_attention_2" # uncomment on compatible GPU
)
tokenizer = AutoTokenizer.from_pretrained(model_id)
streamer = TextStreamer(tokenizer, skip_prompt=True, skip_special_tokens=True)
prompt = "Implement QuickSort algorithm with complexity analysis"
input_ids = tokenizer.apply_chat_template(
[{"role": "user", "content": prompt}],
add_generation_prompt=True,
return_tensors="pt",
tokenize=True,
).to(model.device)
output = model.generate(
input_ids,
do_sample=True,
temperature=0.1,
top_k=50,
top_p=0.1,
repetition_penalty=1.05,
max_new_tokens=512,
streamer=streamer,
)
from vllm import LLM, SamplingParams
llm = LLM(model="yasserrmd/GLM4.7-Distill-LFM2.5-1.2B")
sampling_params = SamplingParams(
temperature=0.1,
top_k=50,
top_p=0.1,
repetition_penalty=1.05,
max_tokens=512
)
prompts = [
"Implement QuickSort algorithm",
"Solve the Longest Common Subsequence problem",
"Design a hash table with collision handling"
]
outputs = llm.generate(prompts, sampling_params)
for output in outputs:
print(output.outputs[0].text)
Please refer to the licenses of:
This repository follows the same usage constraints as the upstream components.