Feature Extraction
Transformers
PyTorch
hear_canon_vit
audio
medical
embeddings
vision-transformer
distillation
canon
custom_code
Instructions to use matthewagi/HeAR-s with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use matthewagi/HeAR-s with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("feature-extraction", model="matthewagi/HeAR-s", trust_remote_code=True)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("matthewagi/HeAR-s", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
| { | |
| "amp": false, | |
| "batch_size": 128, | |
| "canon": true, | |
| "canon_2d": true, | |
| "canon_a": false, | |
| "canon_abcd": true, | |
| "canon_b": false, | |
| "canon_b_qkv": false, | |
| "canon_c": false, | |
| "canon_causal": false, | |
| "canon_d": false, | |
| "canon_kernel": 4, | |
| "canon_no_pos_enc": true, | |
| "canon_post": false, | |
| "canon_pre": false, | |
| "clip_seconds": 2.0, | |
| "contrastive_temp": 0.07, | |
| "data_dir": "/home/ubuntu/HeAR/HeAR/data/laion_audio_lake2", | |
| "device": "cuda", | |
| "gns_every": 5, | |
| "gns_param_sample": 200000, | |
| "grad_accum": 1, | |
| "live_shard_refresh": true, | |
| "log_every": 10, | |
| "loss_contrastive_weight": 0.5, | |
| "loss_mse_weight": 1.0, | |
| "loss_relational_weight": 0.5, | |
| "lr": 0.0003, | |
| "lr_gns_adapt": true, | |
| "lr_gns_ema_beta": 0.995, | |
| "lr_gns_max_factor": 1.0, | |
| "lr_gns_min_factor": 0.1, | |
| "lr_gns_min_samples": 100, | |
| "lr_gns_ref_batch": 0.0, | |
| "lr_gns_update_every": 1000, | |
| "lr_min_ratio": 0.1, | |
| "lr_schedule": "none", | |
| "lr_warmup_steps": 0, | |
| "max_checkpoints": 20, | |
| "max_steps": 200000, | |
| "num_workers": 4, | |
| "out": "/home/ubuntu/HeAR/HeAR/checkpoints/hear_vit_s_lake", | |
| "repeat": true, | |
| "resume_from": "checkpoints/hear_vit_s_lake/ckpt_013000.pt", | |
| "resume_latest": false, | |
| "resume_require_optim": true, | |
| "sample_rate": 16000, | |
| "save_every": 1000, | |
| "seed": 1337, | |
| "shard_refresh_sec": 20.0, | |
| "shards_glob": "shard-*.tar", | |
| "shuffle_shards": true, | |
| "streams_glob": "stream-*", | |
| "teacher_id": "google/hear-pytorch", | |
| "val_batches": 5, | |
| "val_defer_check_every": 10, | |
| "val_defer_start_steps": 10, | |
| "val_every": 250, | |
| "val_fraction": 0.0, | |
| "val_shards_file": "/home/ubuntu/HeAR/HeAR/checkpoints/hear_vit_s_lake/val_shards.json", | |
| "val_target_clips": 10000, | |
| "wandb": true, | |
| "wandb_entity": null, | |
| "wandb_project": "hear-distill", | |
| "wandb_run_name": null, | |
| "wandb_tags": null, | |
| "weight_decay": 0.05 | |
| } |