初始化项目,由ModelHub XC社区提供模型

Model: Yhyu13/LMCocktail-Mistral-7B-v1
Source: Original Platform
This commit is contained in:
ModelHub XC
2026-05-25 07:36:17 +08:00
commit 3b76e11ea3
23 changed files with 114909 additions and 0 deletions

13
scripts/convert.py Normal file
View File

@@ -0,0 +1,13 @@
from transformers import AutoModelForCausalLM
import torch
import torch.utils.dlpack
# Load the original model
model_name = "./mixed_llm"
model = AutoModelForCausalLM.from_pretrained(model_name, trust_remote_code=True)
# Convert the model to a different precision
model = model.bfloat16()
# Save the model as a safetensor
model.save_pretrained(f"./mixed_llm_half", safetensors=True)