Comments (4)
I also encountered this issue before, can confirm. Probably works with fp16 though, so a simple conversion built into the script may be enough to get it working.
from mergekit.
I tried convert to fp16
def decompose_delta_weight(
new_weight: torch.Tensor,
base_weight: torch.Tensor,
reduced_rank: int,
device: Optional[str] = None,
) -> Tuple[torch.Tensor, torch.Tensor]:
if device is None:
device = "cuda" if torch.cuda.is_available() else "cpu"
new_weight = new_weight.half().to(device)
base_weight = base_weight.half().to(device)
Then I get:
File "/home/ehartford/mergekit/mergekit/scripts/extract_lora.py", line 36, in _low_rank_decomposition
U, S, Vh = torch.linalg.svd(weight, full_matrices=False)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: "svd_cuda_gesvdj" not implemented for 'Half'
from mergekit.
@ehartford thanks for pointing this out. It seems torch.linalg.svd
only works with full precision fp32 (so .float()
instead of .half()
should work). Working on a fix right now. Should be up in a few minutes.
from mergekit.
Ok, fix is now live on the lora-extraction branch
@cg123 can we merge it into main and close this?
from mergekit.
Related Issues (20)
- Result of merging 2 Gemma2 9B models gains 1B parameters somehow HOT 6
- How to Create a New Merging Method HOT 1
- The speed issue with the GTATask. HOT 3
- Create Communication Channels for MergeKit
- mergekit saves tied and ignored weights unlike what transformers does when saving
- MoE exits itself after expert prompts 100% 2/2
- Example case of task_arithmetic needed HOT 1
- Is there a way to run LORA extraction using multi GPU? 70B LORA extraction OOM on 24GB 3090Ti HOT 1
- Null vocab_file Issue with mistral v03 based models when using union tokenizer source HOT 2
- Error at MoE Qwen 1.5B HOT 2
- Support for Phi-3-Small [Feature ?]
- MergeKit GUI not working.
- passthrough merge error: Tensor model.layers.86.self_attn.k_norm.weight required but not present in model mistralai/Mistral-Large-Instruct-2407 HOT 2
- Working Example of the Mergkit-Evo
- Example of a config file for task_arithmetic 'negative' operation and a case for 'Task analogies' HOT 1
- Merging two mistral based models with different architectures. Looking for some guidance. HOT 1
- 解决运行错误
- 怎么解决mergekit-yaml qwen_sail.yaml ./fddfgh/ Warmup loader cache: 100%|▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒| 2/2 [00:00<00:00, 64.02it/s] Executing graph: 0%| | 0/1457 [00:00<?, ?it/s]Segmentation fault
- 小白怎么合并模型 yaml文件配置 HOT 1
- Is it possible to merge Mistral 7B and Mistral NeMo 12B? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mergekit.