OPEA
/

GGUF
conversational
cicdatopea commited on
Commit
ed17963
·
verified ·
1 Parent(s): ebdfdbf

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +21 -1
README.md CHANGED
@@ -81,7 +81,27 @@ Please follow the [Build llama.cpp locally](https://github.com/ggerganov/llama.c
81
  **5*80G gpu is needed(could optimize), 1.4T cpu memory is needed**
82
 
83
 
84
- **3 tuning**
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
85
  ```python
86
  import torch
87
  from transformers import AutoModelForCausalLM, AutoTokenizer
 
81
  **5*80G gpu is needed(could optimize), 1.4T cpu memory is needed**
82
 
83
 
84
+ **1 add meta data to bf16 model** https://huggingface.co/opensourcerelease/DeepSeek-R1-bf16
85
+
86
+ ~~~python
87
+ import safetensors
88
+ from safetensors.torch import save_file
89
+
90
+ for i in range(1, 164):
91
+ idx_str = "0" * (5-len(str(i))) + str(i)
92
+ safetensors_path = f"model-{idx_str}-of-000163.safetensors"
93
+ print(safetensors_path)
94
+ tensors = dict()
95
+ with safetensors.safe_open(safetensors_path, framework="pt") as f:
96
+ for key in f.keys():
97
+ tensors[key] = f.get_tensor(key)
98
+ save_file(tensors, safetensors_path, metadata={'format': 'pt'})
99
+ ~~~
100
+
101
+
102
+
103
+ **2 remove torch.no_grad** in modeling_deepseek.py as we need some tuning in AutoRound.
104
+
105
  ```python
106
  import torch
107
  from transformers import AutoModelForCausalLM, AutoTokenizer