Buckets:
bbkdevops/unicosys-hypergraph-bucket / tinymind-native-colab-handoff /bundle /train /lora_patterns.py
| from __future__ import annotations | |
| def parse_lora_pattern(value: str | None) -> dict[str, int]: | |
| if not value: | |
| return {} | |
| pattern: dict[str, int] = {} | |
| for part in value.split(","): | |
| item = part.strip() | |
| if not item: | |
| continue | |
| if ":" not in item: | |
| raise ValueError(f"invalid LoRA pattern entry {item!r}; expected module:int") | |
| key, raw = item.split(":", 1) | |
| key = key.strip() | |
| if not key: | |
| raise ValueError(f"invalid LoRA pattern entry {item!r}; empty module") | |
| rank = int(raw.strip()) | |
| if rank <= 0: | |
| raise ValueError(f"invalid LoRA pattern entry {item!r}; value must be positive") | |
| pattern[key] = rank | |
| return pattern | |
Xet Storage Details
- Size:
- 750 Bytes
- Xet hash:
- cf68e4dfee2bf1acd5107cdb4de279930412f24bac71d3a80f78f5fbbd8fb310
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.