summaryrefslogtreecommitdiff
path: root/examples/llava/llava-surgery.py
diff options
context:
space:
mode:
Diffstat (limited to 'examples/llava/llava-surgery.py')
-rw-r--r--examples/llava/llava-surgery.py4
1 files changed, 0 insertions, 4 deletions
diff --git a/examples/llava/llava-surgery.py b/examples/llava/llava-surgery.py
index 8b7a62fb..4f2da3be 100644
--- a/examples/llava/llava-surgery.py
+++ b/examples/llava/llava-surgery.py
@@ -25,9 +25,6 @@ if len(clip_tensors) > 0:
clip = {name.replace("vision_tower.vision_tower.", ""): checkpoint[name].float() for name in clip_tensors}
torch.save(clip, f"{args.model}/llava.clip")
- # remove these tensors
- for name in clip_tensors:
- del checkpoint[name]
# added tokens should be removed to be able to convert Mistral models
if os.path.exists(f"{args.model}/added_tokens.json"):
@@ -35,7 +32,6 @@ if len(clip_tensors) > 0:
f.write("{}\n")
- torch.save(checkpoint, path)
print("Done!")
print(f"Now you can convert {args.model} to a regular LLaMA GGUF file.")