Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions examples/lfm2/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Liquid Foundation Models 2

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TIL about liquid foundation models


LFM2 support in transformers exists in the main branch, but is not yet included in the transformers release.

```bash
pip install --upgrade --no-deps --force-reinstall git+https://github.com/huggingface/transformers.git
```
48 changes: 48 additions & 0 deletions examples/lfm2/lfm2-350m-fft.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
base_model: LiquidAI/LFM2-350M

chunked_cross_entropy: true

chat_template: tokenizer_default
eot_tokens:
- "<|im_end|>"
datasets:
- path: mlabonne/FineTome-100k
type: chat_template
split: train[:20%]
field_messages: conversations
message_field_role: from
message_field_content: value
dataset_prepared_path: last_run_prepared
val_set_size: 0.05
output_dir: ./outputs/out

Comment thread
winglian marked this conversation as resolved.
sequence_len: 4096
sample_packing: true
pad_to_sequence_len: true

wandb_project:
wandb_entity:
wandb_watch:
wandb_name:
wandb_log_model:

gradient_accumulation_steps: 2
micro_batch_size: 4
num_epochs: 1
optimizer: adamw_torch_fused
lr_scheduler: cosine
learning_rate: 5e-5

bf16: true
tf32: true

gradient_checkpointing: false
resume_from_checkpoint:
Comment thread
winglian marked this conversation as resolved.
logging_steps: 1
flash_attention: true

warmup_ratio: 0.1
evals_per_epoch: 2
saves_per_epoch: 1

weight_decay: 0.0