Views
No views yet
LiquidAI/LFM2.5-1.2B-Instruct on Hermes agent reasoning traces.LiquidAI/LFM2.5-1.2B-InstructAyoubChLin/LFM2.5-1.2B-hermes-agentAyoubChLin/LFM2.5-1.2B-hermes-agent-loratransformers, trl (SFTTrainer), peft, datasetslambda/hermes-agent-reasoning-traces with config kimisystem, user, assistant, tool)<tool_call>...</tool_call> blocks into LFM tool-call format:
<|tool_call_start|>[...]<|tool_call_end|><tool_response>...</tool_response> to raw tool role content<|startoftext|>, <|im_start|>, <|im_end|>, <|endoftext|>16,3847,6464,9872,65904,887 train / 100 validationa6kutghd):116,384True44adamw_8bit2e-4cosine0.030.011.0bf16=True, tf32=TrueTrue (use_reentrant=False)42r=32, alpha=64, dropout=0.05q_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_projmodules_to_save: embed_tokens, lm_headNVIDIA B200train_loss: 0.4654train/loss (last logged step): 0.3460eval/loss: 0.3581eval/mean_token_accuracy: 0.9141train_runtime: 945.35s (~15.8 min)train_samples_per_second: 3.42train_steps_per_second: 0.215eval/runtime: 6.44stotal_flos: 3.5557e17train/global_step: 203crashed, but training/evaluation metrics and model artifacts were logged and used for merge/push.1import torch
2from transformers import AutoTokenizer, AutoModelForCausalLM
3
4model_id = "AyoubChLin/LFM2.5-1.2B-hermes-agent"
5
6tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
7model = AutoModelForCausalLM.from_pretrained(
8 model_id,
9 torch_dtype=torch.bfloat16,
10 device_map="auto",
11 trust_remote_code=True,
12)
13
14messages = [
15 {"role": "user", "content": "List Python files in /workspace and count them."}
16]
17
18inputs = tokenizer.apply_chat_template(
19 messages,
20 add_generation_prompt=True,
21 return_tensors="pt",
22).to(model.device)
23
24with torch.no_grad():
25 out = model.generate(
26 inputs,
27 max_new_tokens=512,
28 temperature=0.6,
29 top_k=50,
30 repetition_penalty=1.05,
31 )
32
33print(tokenizer.decode(out[0], skip_special_tokens=True))kimi) and a single training epoch.lfm25-hermes-sft-a100-1.ipynbcherguelainea/lfm25-hermes-sft/a6kutghd