Downloads · 30 days
14
0% of all-time downloads
Factor168/lfm2-hybridai-perls-sft-merged
lfm2-hybridai-perls-sft-merged is a text generation model from Factor168. 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.
Full merged checkpoint of LiquidAI/LFM2-1.2B fine-tuned (LoRA, merged) on Gestalt dialogue (Bry=user, Fritz=assistant) using 1–10 turn sliding windows from perls/perlssft.jsonl (combined perls.txt + perlssynth.txt).
Downloads · 30 days
14
0% of all-time downloads
All-time downloads
3.3K
Public
Parameters
1.2B
2.3 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors2.3 GB · 100%
From the Hugging Face model README
Full merged checkpoint of LiquidAI/LFM2-1.2B fine-tuned (LoRA, merged) on Gestalt dialogue
(Bry=user, Fritz=assistant) using 1–10 turn sliding windows from perls/perls_sft.jsonl
(combined perls.txt + perls_synth.txt).
LiquidAI/LFM2-1.2Bmerge_and_unload)perls/perls_sft.jsonlmessages with user/assistant rolesperls/train_perls_sft_lora.pyRecommended sampling (matches training demo):
Example outputs after fine-tuning (using the same sampling parameters):
Ich bin gestresst. → [1, 21221, 11572, 6658, 1276, 820, 523]Ich kann mich nicht motivieren. → [1, 21221, 6417, 16169, 3355, 19044, 6110, 523]Ich habe Angst. → [1, 21221, 12845, 63888, 523]Wer sind Sie? → [1, 34633, 3987, 3612, 540]Dr. Perls, was machen Sie? → [1, 9549, 523, 3563, 4442, 521, 953, 18532, 3612, 540]Was ist Gestalttherapie? → [1, 28519, 2168, 22185, 2369, 1118, 39134, 540]import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
repo = "Factor168/lfm2-hybridai-perls-sft-merged"
tok = AutoTokenizer.from_pretrained(repo)
model = AutoModelForCausalLM.from_pretrained(repo, torch_dtype="auto").eval()
prompt = "Ich bin gestresst."
text = tok.apply_chat_template(
[{"role": "user", "content": prompt}],
tokenize=False,
add_generation_prompt=True,
)
inputs = tok(text, return_tensors="pt").to(model.device)
out = model.generate(
**inputs,
max_new_tokens=256,
do_sample=True,
temperature=0.3,
min_p=0.15,
repetition_penalty=1.05,
pad_token_id=tok.pad_token_id,
)
print(tok.decode(out[0, inputs['input_ids'].shape[1]:], skip_special_tokens=True))
vLLM can load this merged checkpoint directly:
vllm serve Factor168/lfm2-hybridai-perls-sft-merged --tensor-parallel-size 1 --max-model-len 2048