Views
No views yet
1hf_repo_name = "MatteoKhan/Qwen1.5-DeepSeek-Merge"
2
3config = {
4 "merge_method": "linear",
5 "dtype": torch.bfloat16,
6 "models": [
7 {
8 "model": "Qwen/Qwen1.5-1.8B",
9 "parameters": {
10 "weight": 0.5
11 }
12 },
13 {
14 "model": "deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B",
15 "parameters": {
16 "weight": 0.5
17 }
18 }
19 ],
20 "parameters": {
21 "normalize": True
22 },
23 "layers": [
24 {"pattern": "model."}
25 ]
26}
27📊 No formal benchmark yet—community testing is welcome!
28
29🌱 Environmental Impact
30By merging pre-trained models instead of training from scratch, this approach saves substantial compute and reduces carbon emissions.
31
32🚀 How to Use
33python
34Copier
35Modifier
36from transformers import AutoModelForCausalLM, AutoTokenizer
37
38model_name = "MatteoKhan/Qwen1.5-DeepSeek-Merge"
39tokenizer = AutoTokenizer.from_pretrained(model_name)
40model = AutoModelForCausalLM.from_pretrained(model_name, torch_dtype="auto")
41
42prompt = "What are the implications of quantum computing on AI?"
43inputs = tokenizer(prompt, return_tensors="pt")
44outputs = model.generate(**inputs, max_length=200)
45response = tokenizer.decode(outputs[0], skip_special_tokens=True)
46print(response)
47
48📬 Questions or feedback? Contact via Hugging Face or LinkedIn