Views
No views yet
0.4.11base_model: LemiSt/SmolLM-135M-de
2model_type: LlamaForCausalLM
3tokenizer_type: GPT2Tokenizer
4load_in_8bit: false
5load_in_4bit: true
6strict: false
7push_dataset_to_hub:
8datasets:
9 - path: smollm_dataset.json
10 type: sharegpt
11 conversation: chatml
12chat_template: chatml
13default_system_prompt: "Du bist ein hilfreicher KI-Assistent."
14dataset_prepared_path:
15val_set_size: 0.05
16adapter: qlora
17lora_model_dir:
18sequence_len: 2048
19sample_packing: true
20lora_r: 32
21lora_alpha: 16
22lora_dropout: 0.05
23lora_target_modules:
24lora_target_linear: true
25lora_fan_in_fan_out:
26wandb_project: smollm-135m-de-sft-qlora
27wandb_entity:
28wandb_watch:
29wandb_name:
30wandb_log_model:
31output_dir: ./outputs/smollm-135m-sft-qlora-out
32hub_model_id: LemiSt/SmolLM-135M-instruct-de
33hub_strategy: end
34gradient_accumulation_steps: 16
35micro_batch_size: 2
36num_epochs: 2
37optimizer: adamw_bnb_8bit
38torchdistx_path:
39lr_scheduler: cosine
40learning_rate: 0.003
41train_on_inputs: false
42group_by_length: false
43bf16: true
44fp16: false
45tf32: false
46gradient_checkpointing: true
47early_stopping_patience:
48resume_from_checkpoint:
49local_rank:
50logging_steps: 1
51xformers_attention:
52flash_attention: true
53gptq_groupsize:
54gptq_model_v1:
55warmup_steps: 20
56evals_per_epoch: 4
57saves_per_epoch: 4
58debug:
59deepspeed:
60weight_decay: 0.1
61fsdp:
62fsdp_config:
63special_tokens:
64 bos_token: "<|endoftext|>"
65 eos_token: "<|endoftext|>"
66 unk_token: "<|endoftext|>"
671import torch
2from transformers import AutoTokenizer, AutoModelForCausalLM
3checkpoint = "LemiSt/SmolLM-135M-instruct-de-merged"
4tokenizer = AutoTokenizer.from_pretrained(checkpoint)
5device = "cuda" if torch.cuda.is_available() else "cpu"
6model = AutoModelForCausalLM.from_pretrained(checkpoint, device_map=device, torch_dtype=torch.bfloat16)
7messages = [
8 {"role": "system", "content": "Du bist ein hilfreicher Assistent."},
9 {"role": "user", "content": "Was ist der Sinn des Lebens?"}
10]
11inputs = tokenizer.apply_chat_template(messages, tokenize=True, return_tensors="pt", add_generation_prompt=True).to(device)
12outputs = model.generate(inputs, max_new_tokens=256, do_sample=True, temperature=0.4, top_p=0.9, repetition_penalty=1.1, top_k=512)
13print(tokenizer.decode(outputs[0][inputs.shape[1]:], skip_special_tokens=True))| Training Loss | Epoch | Step | Validation Loss |
|---|---|---|---|
| 1.6406 | 0.0005 | 1 | 1.6172 |
| 0.8219 | 0.2497 | 501 | 0.8901 |
| 0.8646 | 0.4995 | 1002 | 0.8370 |
| 0.8651 | 0.7492 | 1503 | 0.8052 |
| 0.7231 | 0.9989 | 2004 | 0.7827 |
| 0.7632 | 1.2468 | 2505 | 0.7673 |
| 0.7543 | 1.4967 | 3006 | 0.7536 |
| 0.7782 | 1.7466 | 3507 | 0.7469 |
| 0.6724 | 1.9966 | 4008 | 0.7453 |