Text Generation
Transformers
bloom
Eval Results
TheBloke commited on
Commit
feb866a
1 Parent(s): 38f1ddb

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +15 -1
README.md CHANGED
@@ -703,6 +703,8 @@ To join the files on Windows, open a Command Prompt and run:
703
  COPY /B gptq_model-4bit--1g.JOINBEFOREUSE.split-a.safetensors + gptq_model-4bit--1g.JOINBEFOREUSE.split-b.safetensors + gptq_model-4bit--1g.JOINBEFOREUSE.split-c.safetensors gptq_model-4bit--1g.safetensors
704
  ```
705
 
 
 
706
  The SHA256SUM of the joined file will be:
707
  ```
708
  50baeab9859362d22df6f822f158b9ba75b44ffc6605b715992fe6245aa6e93a gptq_model-4bit--1g.safetensors
@@ -778,7 +780,19 @@ snapshot_download(repo_id="TheBloke/bloomz-176B-GPTQ",
778
 
779
  If you want to download the group_size 128g file instead, add `revision="group_size_128g"` to the above command.
780
 
781
- Now join the three `split` files up as described above, to get a single `safetensors` file.
 
 
 
 
 
 
 
 
 
 
 
 
782
 
783
  Then try the following example code:
784
 
 
703
  COPY /B gptq_model-4bit--1g.JOINBEFOREUSE.split-a.safetensors + gptq_model-4bit--1g.JOINBEFOREUSE.split-b.safetensors + gptq_model-4bit--1g.JOINBEFOREUSE.split-c.safetensors gptq_model-4bit--1g.safetensors
704
  ```
705
 
706
+ Or for Python code for joining the files, see the Python section below.
707
+
708
  The SHA256SUM of the joined file will be:
709
  ```
710
  50baeab9859362d22df6f822f158b9ba75b44ffc6605b715992fe6245aa6e93a gptq_model-4bit--1g.safetensors
 
780
 
781
  If you want to download the group_size 128g file instead, add `revision="group_size_128g"` to the above command.
782
 
783
+ Now join the three `split` files, which can be done with the following Python code:
784
+ ```python
785
+ import glob
786
+
787
+ # Get the list of all files matching the pattern
788
+ files = glob.glob('gptq_model-4bit--1g.JOINBEFOREUSE.split-*.safetensors')
789
+
790
+ # Open the output file in binary write mode
791
+ with open('gptq_model-4bit--1g.safetensors', 'wb') as outfile:
792
+ for filename in files:
793
+ with open(filename, 'rb') as infile:
794
+ outfile.write(infile.read())
795
+ ```
796
 
797
  Then try the following example code:
798