metadata
license: mit
base_model: croissantllm/CroissantLLMBase
tags:
- generated_from_trainer
model-index:
- name: out_translation
results: []
Usage
>>> chat_input = "<|im_start|> system\nYou are a helpful assistant.<|im_end|> \n<|im_start|> user\nTraduit ce texte en anglais : \nEn 1975, la localité comptait 90 habitants, des Guiziga et lors du recensement de 2005, on y a dénombré x habitants.<|im_end|> \n<|im_start|> assistant\n"
>>> inputs = tokenizer(chat_input, return_tensors="pt").to(model.device)
>>> tokens = model.generate(**inputs, **generation_args)
Setting `pad_token_id` to `eos_token_id`:2 for open-end generation.
>>> print(tokenizer.decode(tokens[0]))
<s><|im_start|> system
You are a helpful assistant.<|im_end|>
<|im_start|> user
Traduit ce texte en anglais :
En 1975, la localité comptait 90 habitants, des Guiziga et lors du recensement de 2005, on y a dénombré x habitants.<|im_end|>
<|im_start|> assistant
When the town had 90 inhabitants in 1975, it was called Guizaga and during the census of 2005, there were x inhabitants.<|im_end|>
</s>
>>> chat_input = "<|im_start|> system\nYou are a helpful assistant.<|im_end|> \n<|im_start|> user\nCorrige les fautes dans ce texte : \nEn 1975, la localité comptait 90 habitant, des Guiziga et lors du recensement de 2005, on y a dénombrer 56 habitants.<|im_end|> \n<|im_start|> assistant\n"
>>> inputs = tokenizer(chat_input, return_tensors="pt").to(model.device)
>>> tokens = model.generate(**inputs, **generation_args)
Setting `pad_token_id` to `eos_token_id`:2 for open-end generation.
>>> print(tokenizer.decode(tokens[0]))
<s><|im_start|> system
You are a helpful assistant.<|im_end|>
<|im_start|> user
Corrige les fautes dans ce texte :
En 1975, la localité comptait 90 habitant, des Guiziga et lors du recensement de 2005, on y a dénombrer 56 habitants.<|im_end|>
<|im_start|> assistant
En 1975, la commune comptait 90 habitants dont des Guizigas et au recensement de 2005, elle en compte 56.<|im_end|>
</s>
>>>
See axolotl config
axolotl version: 0.4.0
base_model: croissantllm/CroissantLLMBase
model_type: LlamaForCausalLM
tokenizer_type: LlamaTokenizerFast
is_llama_derived_model: true
special_tokens:
bos_token: "<s>"
eos_token: "</s>"
unk_token: "<unk>"
tokens:
- "<|im_start|>"
- "<|im_end|>"
load_in_8bit: false
load_in_4bit: false
strict: false
datasets:
- path: manu/dataset_1
split: train
type: sharegpt
chat_template: "chatml"
# default_system_message: "Rewrite the sentence to remove the PII."
dataset_prepared_path: last_pii
val_set_size: 0.05
output_dir: ./out_translation
sequence_len: 2048
sample_packing: false
pad_to_sequence_len: false
adapter:
lora_model_dir:
lora_r:
lora_alpha:
lora_dropout:
lora_target_linear:
lora_fan_in_fan_out:
wandb_project:
wandb_entity:
wandb_watch:
wandb_name:
wandb_log_model:
gradient_accumulation_steps: 1
micro_batch_size: 16
num_epochs: 1
optimizer: adamw_bnb_8bit
lr_scheduler: cosine
learning_rate: 0.00003
train_on_inputs: false
group_by_length: false
bf16: auto
fp16: false
tf32: true
gradient_checkpointing: true
early_stopping_patience:
resume_from_checkpoint:
local_rank:
logging_steps: 1
xformers_attention:
flash_attention: true
flash_attn_cross_entropy: false
flash_attn_rms_norm: true
flash_attn_fuse_qkv: false
flash_attn_fuse_mlp: true
warmup_steps: 100
evals_per_epoch: 4
eval_table_size:
saves_per_epoch: 1
debug:
deepspeed: #deepspeed_configs/zero2.json # multi-gpu only
weight_decay: 0.05
fsdp:
fsdp_config:
out_translation
This model is a fine-tuned version of croissantllm/CroissantLLMBase on the None dataset. It achieves the following results on the evaluation set:
- Loss: 0.0108
Model description
More information needed
Intended uses & limitations
More information needed
Training and evaluation data
More information needed
Training procedure
Training hyperparameters
The following hyperparameters were used during training:
- learning_rate: 3e-05
- train_batch_size: 16
- eval_batch_size: 16
- seed: 42
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: cosine
- lr_scheduler_warmup_steps: 100
- num_epochs: 1
Training results
Training Loss | Epoch | Step | Validation Loss |
---|---|---|---|
1.2927 | 0.0 | 1 | 0.3293 |
0.2151 | 0.25 | 145 | 0.0175 |
0.3389 | 0.5 | 290 | 0.0128 |
0.0917 | 0.75 | 435 | 0.0108 |
Framework versions
- Transformers 4.38.0.dev0
- Pytorch 2.3.0+cu121
- Datasets 2.16.1
- Tokenizers 0.15.0