Instructions to use casualprogrammer/shadow_mbart with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use casualprogrammer/shadow_mbart with PEFT:
from peft import PeftModel from transformers import AutoModelForSeq2SeqLM base_model = AutoModelForSeq2SeqLM.from_pretrained("facebook/mbart-large-50") model = PeftModel.from_pretrained(base_model, "casualprogrammer/shadow_mbart") - Transformers
How to use casualprogrammer/shadow_mbart with Transformers:
# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSeq2SeqLM tokenizer = AutoTokenizer.from_pretrained("casualprogrammer/shadow_mbart") model = AutoModelForSeq2SeqLM.from_pretrained("casualprogrammer/shadow_mbart", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download meta_config.json from casualprogrammer/shadow_mbart: direct link, hf CLI and curl.
- Browser
- Download file 8.16 kB
-
https://huggingface.co/casualprogrammer/shadow_mbart/resolve/main/meta_config.json
- Command line
-
hf download hf://casualprogrammer/shadow_mbart/meta_config.json
-
curl -L -o meta_config.json https://huggingface.co/casualprogrammer/shadow_mbart/resolve/main/meta_config.json
8.16 kB
| { | |
| "model_name": "facebook/mbart-large-50", | |
| "dataset_path": null, | |
| "training_args": { | |
| "output_dir": "./output/mbart-large-first", | |
| "per_device_train_batch_size": 1, | |
| "num_train_epochs": 3, | |
| "max_steps": -1, | |
| "learning_rate": 3e-05, | |
| "lr_scheduler_type": "linear", | |
| "lr_scheduler_kwargs": null, | |
| "warmup_steps": 1000, | |
| "optim": "adamw_torch_fused", | |
| "optim_args": null, | |
| "weight_decay": 0.01, | |
| "adam_beta1": 0.9, | |
| "adam_beta2": 0.999, | |
| "adam_epsilon": 1e-08, | |
| "optim_target_modules": null, | |
| "gradient_accumulation_steps": 1, | |
| "average_tokens_across_devices": true, | |
| "max_grad_norm": 1.0, | |
| "label_smoothing_factor": 0.0, | |
| "bf16": true, | |
| "fp16": false, | |
| "bf16_full_eval": false, | |
| "fp16_full_eval": false, | |
| "tf32": null, | |
| "gradient_checkpointing": false, | |
| "gradient_checkpointing_kwargs": null, | |
| "torch_compile": false, | |
| "torch_compile_backend": null, | |
| "torch_compile_mode": null, | |
| "use_liger_kernel": false, | |
| "liger_kernel_config": null, | |
| "use_cache": false, | |
| "neftune_noise_alpha": null, | |
| "torch_empty_cache_steps": null, | |
| "auto_find_batch_size": false, | |
| "logging_strategy": "epoch", | |
| "logging_steps": 500, | |
| "logging_first_step": false, | |
| "log_on_each_node": true, | |
| "logging_nan_inf_filter": true, | |
| "include_num_input_tokens_seen": "no", | |
| "log_level": "passive", | |
| "log_level_replica": "warning", | |
| "disable_tqdm": false, | |
| "report_to": [], | |
| "run_name": null, | |
| "project": "huggingface", | |
| "trackio_space_id": "trackio", | |
| "eval_strategy": "epoch", | |
| "eval_steps": null, | |
| "eval_delay": 0, | |
| "per_device_eval_batch_size": 1, | |
| "prediction_loss_only": false, | |
| "eval_on_start": false, | |
| "eval_do_concat_batches": true, | |
| "eval_use_gather_object": false, | |
| "eval_accumulation_steps": null, | |
| "include_for_metrics": [], | |
| "batch_eval_metrics": false, | |
| "save_only_model": false, | |
| "save_strategy": "epoch", | |
| "save_steps": 500, | |
| "save_on_each_node": false, | |
| "save_total_limit": 2, | |
| "enable_jit_checkpoint": false, | |
| "push_to_hub": false, | |
| "hub_token": "<HUB_TOKEN>", | |
| "hub_private_repo": null, | |
| "hub_model_id": null, | |
| "hub_strategy": "every_save", | |
| "hub_always_push": false, | |
| "hub_revision": null, | |
| "load_best_model_at_end": true, | |
| "metric_for_best_model": "eval_loss", | |
| "greater_is_better": false, | |
| "ignore_data_skip": false, | |
| "restore_callback_states_from_checkpoint": false, | |
| "full_determinism": false, | |
| "seed": 42, | |
| "data_seed": null, | |
| "use_cpu": false, | |
| "accelerator_config": { | |
| "split_batches": false, | |
| "dispatch_batches": null, | |
| "even_batches": true, | |
| "use_seedable_sampler": true, | |
| "non_blocking": false, | |
| "gradient_accumulation_kwargs": null | |
| }, | |
| "parallelism_config": null, | |
| "dataloader_drop_last": false, | |
| "dataloader_num_workers": 0, | |
| "dataloader_pin_memory": true, | |
| "dataloader_persistent_workers": false, | |
| "dataloader_prefetch_factor": null, | |
| "remove_unused_columns": true, | |
| "label_names": null, | |
| "train_sampling_strategy": "random", | |
| "length_column_name": "length", | |
| "ddp_find_unused_parameters": null, | |
| "ddp_bucket_cap_mb": null, | |
| "ddp_broadcast_buffers": null, | |
| "ddp_backend": null, | |
| "ddp_timeout": 1800, | |
| "fsdp": [], | |
| "fsdp_config": { | |
| "min_num_params": 0, | |
| "xla": false, | |
| "xla_fsdp_v2": false, | |
| "xla_fsdp_grad_ckpt": false | |
| }, | |
| "deepspeed": null, | |
| "debug": [], | |
| "skip_memory_metrics": true, | |
| "do_train": false, | |
| "do_eval": true, | |
| "do_predict": false, | |
| "resume_from_checkpoint": null, | |
| "warmup_ratio": null, | |
| "logging_dir": null, | |
| "local_rank": -1, | |
| "sortish_sampler": false, | |
| "predict_with_generate": true, | |
| "generation_max_length": null, | |
| "generation_num_beams": null, | |
| "generation_config": { | |
| "max_length": 200, | |
| "max_new_tokens": null, | |
| "min_length": null, | |
| "min_new_tokens": null, | |
| "early_stopping": true, | |
| "max_time": 30, | |
| "stop_strings": null, | |
| "do_sample": null, | |
| "num_beams": 2, | |
| "use_cache": true, | |
| "cache_implementation": null, | |
| "cache_config": null, | |
| "temperature": null, | |
| "top_k": null, | |
| "top_p": null, | |
| "min_p": null, | |
| "top_h": null, | |
| "typical_p": null, | |
| "epsilon_cutoff": null, | |
| "eta_cutoff": null, | |
| "repetition_penalty": null, | |
| "encoder_repetition_penalty": null, | |
| "length_penalty": null, | |
| "no_repeat_ngram_size": null, | |
| "bad_words_ids": null, | |
| "renormalize_logits": null, | |
| "forced_bos_token_id": null, | |
| "forced_eos_token_id": 2, | |
| "remove_invalid_values": null, | |
| "exponential_decay_length_penalty": null, | |
| "suppress_tokens": null, | |
| "begin_suppress_tokens": null, | |
| "sequence_bias": null, | |
| "token_healing": null, | |
| "guidance_scale": null, | |
| "watermarking_config": null, | |
| "num_return_sequences": null, | |
| "output_attentions": null, | |
| "output_hidden_states": null, | |
| "output_scores": null, | |
| "output_logits": null, | |
| "return_dict_in_generate": null, | |
| "pad_token_id": 1, | |
| "bos_token_id": 0, | |
| "eos_token_id": 2, | |
| "encoder_no_repeat_ngram_size": null, | |
| "decoder_start_token_id": 2, | |
| "is_assistant": null, | |
| "num_assistant_tokens": null, | |
| "num_assistant_tokens_schedule": null, | |
| "assistant_confidence_threshold": null, | |
| "prompt_lookup_num_tokens": null, | |
| "max_matching_ngram_size": null, | |
| "assistant_early_exit": null, | |
| "assistant_lookbehind": null, | |
| "target_lookbehind": null, | |
| "compile_config": null, | |
| "disable_compile": null, | |
| "continuous_batching_config": null, | |
| "low_memory": null, | |
| "penalty_alpha": null, | |
| "dola_layers": null, | |
| "diversity_penalty": null, | |
| "num_beam_groups": null, | |
| "constraints": null, | |
| "force_words_ids": null, | |
| "prefill_chunk_size": null, | |
| "_from_model_config": true, | |
| "transformers_version": "5.5.0" | |
| } | |
| }, | |
| "INPUT_COL": "combined_text", | |
| "LABEL_COL": "summary", | |
| "columns_to_keep": [ | |
| "combined_text", | |
| "summary" | |
| ], | |
| "run_cfg": { | |
| "model_name": "facebook/mbart-large-50", | |
| "output_dir": "./output/mbart-large-first", | |
| "LM_type": "seq2seq", | |
| "input_col_name": "combined_text", | |
| "label_col_name": "summary", | |
| "input_text_max_length": 1024, | |
| "summary_text_max_length": 256, | |
| "pad_to_multiple_of_input_text": 1024, | |
| "pad_to_multiple_of_summary_text": 1, | |
| "batch_max_tokens": 16384, | |
| "batch_max_tokens_multiplier": 0.8, | |
| "hyperparameter_search": false, | |
| "objective_is_loss": false, | |
| "bf16": true, | |
| "gradient_accumulation_steps": 1, | |
| "num_train_epochs": 3, | |
| "learning_rate": 3e-05, | |
| "weight_decay": 0.01, | |
| "max_grad_norm": 1.0, | |
| "lr_scheduler_type": "cosine", | |
| "target_modules": "all-linear", | |
| "training_optim": "adamw_torch_fused", | |
| "peft_gradient_checkpointing": false, | |
| "own_bartled_underlying_model": null, | |
| "selector_name": "first" | |
| } | |
| } |