TheBloke commited on
Commit
6bd463c
·
1 Parent(s): c97bd17

Update for Transformers GPTQ support

Browse files
README.md CHANGED
@@ -4,17 +4,20 @@ license: other
4
  ---
5
 
6
  <!-- header start -->
7
- <div style="width: 100%;">
8
- <img src="https://i.imgur.com/EBdldam.jpg" alt="TheBlokeAI" style="width: 100%; min-width: 400px; display: block; margin: auto;">
 
9
  </div>
10
  <div style="display: flex; justify-content: space-between; width: 100%;">
11
  <div style="display: flex; flex-direction: column; align-items: flex-start;">
12
- <p><a href="https://discord.gg/Jq4vkcDakD">Chat & support: my new Discord server</a></p>
13
  </div>
14
  <div style="display: flex; flex-direction: column; align-items: flex-end;">
15
- <p><a href="https://www.patreon.com/TheBlokeAI">Want to contribute? TheBloke's Patreon page</a></p>
16
  </div>
17
  </div>
 
 
18
  <!-- header end -->
19
 
20
  # Jon Durbin's Airoboros 13B GPT4 1.1 GPTQ
@@ -134,11 +137,12 @@ It was created with group_size 128 to increase inference accuracy, but without -
134
  * Parameters: Groupsize = 128. Act Order / desc_act = False.
135
 
136
  <!-- footer start -->
 
137
  ## Discord
138
 
139
  For further support, and discussions on these models and AI in general, join us at:
140
 
141
- [TheBloke AI's Discord server](https://discord.gg/Jq4vkcDakD)
142
 
143
  ## Thanks, and how to contribute.
144
 
@@ -153,12 +157,15 @@ Donaters will get priority support on any and all AI/LLM/model questions and req
153
  * Patreon: https://patreon.com/TheBlokeAI
154
  * Ko-Fi: https://ko-fi.com/TheBlokeAI
155
 
156
- **Special thanks to**: Luke from CarbonQuill, Aemon Algiz, Dmitriy Samsonov.
 
 
157
 
158
- **Patreon special mentions**: Oscar Rangel, Eugene Pentland, Talal Aujan, Cory Kujawski, Luke, Asp the Wyvern, Ai Maven, Pyrater, Alps Aficionado, senxiiz, Willem Michiel, Junyu Yang, trip7s trip, Sebastain Graf, Joseph William Delisle, Lone Striker, Jonathan Leane, Johann-Peter Hartmann, David Flickinger, Spiking Neurons AB, Kevin Schuppel, Mano Prime, Dmitriy Samsonov, Sean Connelly, Nathan LeClaire, Alain Rossmann, Fen Risland, Derek Yates, Luke Pendergrass, Nikolai Manek, Khalefa Al-Ahmad, Artur Olbinski, John Detwiler, Ajan Kanaga, Imad Khwaja, Trenton Dambrowitz, Kalila, vamX, webtim, Illia Dulskyi.
159
 
160
  Thank you to all my generous patrons and donaters!
161
 
 
 
162
  <!-- footer end -->
163
 
164
  # Original model card: Jon Durbin's Airoboros 13B GPT4 1.1
@@ -330,7 +337,7 @@ Once exploited for logging and mining, today the sparsely populated Upper Penins
330
  The Lower Peninsula is a hub for manufacturing, forestry, agriculture, services, and high-tech industry.
331
  ENDINPUT
332
  BEGININSTRUCTION
333
- What is Michigan's capital?
334
  Give me a JSON object with 3 facts from Foolo's article.
335
  What are the states that border Michigan?
336
  Reference?
@@ -578,12 +585,12 @@ void insert(char* key, char* value) {
578
  perror("malloc failed");
579
  exit(1);
580
  }
581
-
582
  strcpy(parent->key, key);
583
  strcpy(parent->value, value);
584
-
585
  parent->left = parent->right = NULL;
586
-
587
  if (!tree) {
588
  tree = parent;
589
  } else {
@@ -599,7 +606,7 @@ char* search(char* key) {
599
  }
600
  current = current->right;
601
  }
602
-
603
  return NULL;
604
  }
605
 
@@ -614,17 +621,17 @@ void print_tree() {
614
  void* accept_client(void* args) {
615
  int client_socket = *(int*)args;
616
  char buffer[1024];
617
-
618
  while (1) {
619
  ssize_t bytes_received = recv(client_socket, buffer, sizeof(buffer), 0);
620
  if (bytes_received <= 0) {
621
  close(client_socket);
622
  break;
623
  }
624
-
625
  char* input = buffer;
626
  char* input_token;
627
-
628
  while ((input_token = strtok(input, " \n")) != NULL) {
629
  switch (input_token[0]) {
630
  case 'G':
@@ -634,7 +641,7 @@ void* accept_client(void* args) {
634
  }
635
  printf("%s = %s\n", input_token, search(input_token));
636
  break;
637
-
638
  case 'S':
639
  if (!strcmp(input_token, "SET")) {
640
  char* key = strtok(NULL, " \n");
@@ -643,7 +650,7 @@ void* accept_client(void* args) {
643
  perror("Invalid input");
644
  exit(1);
645
  }
646
-
647
  insert(key, value);
648
  printf("%s set %s to %s\n", input_token, key, value);
649
  } else {
@@ -651,16 +658,16 @@ void* accept_client(void* args) {
651
  exit(1);
652
  }
653
  break;
654
-
655
  default:
656
  perror("Invalid input");
657
  exit(1);
658
  }
659
-
660
  input = strtok(NULL, " \n");
661
  }
662
  }
663
-
664
  return NULL;
665
  }
666
 
@@ -670,50 +677,50 @@ int main() {
670
  perror("socket failed");
671
  exit(1);
672
  }
673
-
674
  struct sockaddr_in server_addr;
675
  memset(&server_addr, 0, sizeof(server_addr));
676
  server_addr.sin_family = AF_INET;
677
  server_addr.sin_port = htons(8080);
678
  server_addr.sin_addr.s_addr = INADDR_ANY;
679
-
680
  if (bind(server_socket, (struct sockaddr*)&server_addr, sizeof(server_addr)) < 0) {
681
  perror("bind failed");
682
  exit(1);
683
  }
684
-
685
  if (listen(server_socket, 5) < 0) {
686
  perror("listen failed");
687
  exit(1);
688
  }
689
-
690
  pthread_t accept_thread;
691
  pthread_create(&accept_thread, NULL, accept_client, &server_socket);
692
-
693
  char* client_input;
694
  int client_socket = accept(server_socket, (struct sockaddr*)NULL, NULL);
695
  if (client_socket < 0) {
696
  perror("accept failed");
697
  exit(1);
698
  }
699
-
700
  while (1) {
701
  sleep(1);
702
-
703
  char buffer[1024];
704
  ssize_t bytes_received = recv(client_socket, buffer, sizeof(buffer), 0);
705
  if (bytes_received <= 0) {
706
  close(client_socket);
707
  break;
708
  }
709
-
710
  client_input = buffer;
711
  parse_input(client_input);
712
  }
713
-
714
  close(client_socket);
715
  pthread_join(accept_thread, NULL);
716
-
717
  return 0;
718
  }
719
  ```
 
4
  ---
5
 
6
  <!-- header start -->
7
+ <!-- 200823 -->
8
+ <div style="width: auto; margin-left: auto; margin-right: auto">
9
+ <img src="https://i.imgur.com/EBdldam.jpg" alt="TheBlokeAI" style="width: 100%; min-width: 400px; display: block; margin: auto;">
10
  </div>
11
  <div style="display: flex; justify-content: space-between; width: 100%;">
12
  <div style="display: flex; flex-direction: column; align-items: flex-start;">
13
+ <p style="margin-top: 0.5em; margin-bottom: 0em;"><a href="https://discord.gg/theblokeai">Chat & support: TheBloke's Discord server</a></p>
14
  </div>
15
  <div style="display: flex; flex-direction: column; align-items: flex-end;">
16
+ <p style="margin-top: 0.5em; margin-bottom: 0em;"><a href="https://www.patreon.com/TheBlokeAI">Want to contribute? TheBloke's Patreon page</a></p>
17
  </div>
18
  </div>
19
+ <div style="text-align:center; margin-top: 0em; margin-bottom: 0em"><p style="margin-top: 0.25em; margin-bottom: 0em;">TheBloke's LLM work is generously supported by a grant from <a href="https://a16z.com">andreessen horowitz (a16z)</a></p></div>
20
+ <hr style="margin-top: 1.0em; margin-bottom: 1.0em;">
21
  <!-- header end -->
22
 
23
  # Jon Durbin's Airoboros 13B GPT4 1.1 GPTQ
 
137
  * Parameters: Groupsize = 128. Act Order / desc_act = False.
138
 
139
  <!-- footer start -->
140
+ <!-- 200823 -->
141
  ## Discord
142
 
143
  For further support, and discussions on these models and AI in general, join us at:
144
 
145
+ [TheBloke AI's Discord server](https://discord.gg/theblokeai)
146
 
147
  ## Thanks, and how to contribute.
148
 
 
157
  * Patreon: https://patreon.com/TheBlokeAI
158
  * Ko-Fi: https://ko-fi.com/TheBlokeAI
159
 
160
+ **Special thanks to**: Aemon Algiz.
161
+
162
+ **Patreon special mentions**: Sam, theTransient, Jonathan Leane, Steven Wood, webtim, Johann-Peter Hartmann, Geoffrey Montalvo, Gabriel Tamborski, Willem Michiel, John Villwock, Derek Yates, Mesiah Bishop, Eugene Pentland, Pieter, Chadd, Stephen Murray, Daniel P. Andersen, terasurfer, Brandon Frisco, Thomas Belote, Sid, Nathan LeClaire, Magnesian, Alps Aficionado, Stanislav Ovsiannikov, Alex, Joseph William Delisle, Nikolai Manek, Michael Davis, Junyu Yang, K, J, Spencer Kim, Stefan Sabev, Olusegun Samson, transmissions 11, Michael Levine, Cory Kujawski, Rainer Wilmers, zynix, Kalila, Luke @flexchar, Ajan Kanaga, Mandus, vamX, Ai Maven, Mano Prime, Matthew Berman, subjectnull, Vitor Caleffi, Clay Pascal, biorpg, alfie_i, 阿明, Jeffrey Morgan, ya boyyy, Raymond Fosdick, knownsqashed, Olakabola, Leonard Tan, ReadyPlayerEmma, Enrico Ros, Dave, Talal Aujan, Illia Dulskyi, Sean Connelly, senxiiz, Artur Olbinski, Elle, Raven Klaugh, Fen Risland, Deep Realms, Imad Khwaja, Fred von Graf, Will Dee, usrbinkat, SuperWojo, Alexandros Triantafyllidis, Swaroop Kallakuri, Dan Guido, John Detwiler, Pedro Madruga, Iucharbius, Viktor Bowallius, Asp the Wyvern, Edmond Seymore, Trenton Dambrowitz, Space Cruiser, Spiking Neurons AB, Pyrater, LangChain4j, Tony Hughes, Kacper Wikieł, Rishabh Srivastava, David Ziegler, Luke Pendergrass, Andrey, Gabriel Puliatti, Lone Striker, Sebastain Graf, Pierre Kircher, Randy H, NimbleBox.ai, Vadim, danny, Deo Leter
163
 
 
164
 
165
  Thank you to all my generous patrons and donaters!
166
 
167
+ And thank you again to a16z for their generous grant.
168
+
169
  <!-- footer end -->
170
 
171
  # Original model card: Jon Durbin's Airoboros 13B GPT4 1.1
 
337
  The Lower Peninsula is a hub for manufacturing, forestry, agriculture, services, and high-tech industry.
338
  ENDINPUT
339
  BEGININSTRUCTION
340
+ What is Michigan's capital?
341
  Give me a JSON object with 3 facts from Foolo's article.
342
  What are the states that border Michigan?
343
  Reference?
 
585
  perror("malloc failed");
586
  exit(1);
587
  }
588
+
589
  strcpy(parent->key, key);
590
  strcpy(parent->value, value);
591
+
592
  parent->left = parent->right = NULL;
593
+
594
  if (!tree) {
595
  tree = parent;
596
  } else {
 
606
  }
607
  current = current->right;
608
  }
609
+
610
  return NULL;
611
  }
612
 
 
621
  void* accept_client(void* args) {
622
  int client_socket = *(int*)args;
623
  char buffer[1024];
624
+
625
  while (1) {
626
  ssize_t bytes_received = recv(client_socket, buffer, sizeof(buffer), 0);
627
  if (bytes_received <= 0) {
628
  close(client_socket);
629
  break;
630
  }
631
+
632
  char* input = buffer;
633
  char* input_token;
634
+
635
  while ((input_token = strtok(input, " \n")) != NULL) {
636
  switch (input_token[0]) {
637
  case 'G':
 
641
  }
642
  printf("%s = %s\n", input_token, search(input_token));
643
  break;
644
+
645
  case 'S':
646
  if (!strcmp(input_token, "SET")) {
647
  char* key = strtok(NULL, " \n");
 
650
  perror("Invalid input");
651
  exit(1);
652
  }
653
+
654
  insert(key, value);
655
  printf("%s set %s to %s\n", input_token, key, value);
656
  } else {
 
658
  exit(1);
659
  }
660
  break;
661
+
662
  default:
663
  perror("Invalid input");
664
  exit(1);
665
  }
666
+
667
  input = strtok(NULL, " \n");
668
  }
669
  }
670
+
671
  return NULL;
672
  }
673
 
 
677
  perror("socket failed");
678
  exit(1);
679
  }
680
+
681
  struct sockaddr_in server_addr;
682
  memset(&server_addr, 0, sizeof(server_addr));
683
  server_addr.sin_family = AF_INET;
684
  server_addr.sin_port = htons(8080);
685
  server_addr.sin_addr.s_addr = INADDR_ANY;
686
+
687
  if (bind(server_socket, (struct sockaddr*)&server_addr, sizeof(server_addr)) < 0) {
688
  perror("bind failed");
689
  exit(1);
690
  }
691
+
692
  if (listen(server_socket, 5) < 0) {
693
  perror("listen failed");
694
  exit(1);
695
  }
696
+
697
  pthread_t accept_thread;
698
  pthread_create(&accept_thread, NULL, accept_client, &server_socket);
699
+
700
  char* client_input;
701
  int client_socket = accept(server_socket, (struct sockaddr*)NULL, NULL);
702
  if (client_socket < 0) {
703
  perror("accept failed");
704
  exit(1);
705
  }
706
+
707
  while (1) {
708
  sleep(1);
709
+
710
  char buffer[1024];
711
  ssize_t bytes_received = recv(client_socket, buffer, sizeof(buffer), 0);
712
  if (bytes_received <= 0) {
713
  close(client_socket);
714
  break;
715
  }
716
+
717
  client_input = buffer;
718
  parse_input(client_input);
719
  }
720
+
721
  close(client_socket);
722
  pthread_join(accept_thread, NULL);
723
+
724
  return 0;
725
  }
726
  ```
config.json CHANGED
@@ -1,24 +1,34 @@
1
  {
2
- "_name_or_path": "airoboros-13b-gpt4-1.1",
3
- "architectures": [
4
- "LlamaForCausalLM"
5
- ],
6
- "bos_token_id": 0,
7
- "eos_token_id": 1,
8
- "hidden_act": "silu",
9
- "hidden_size": 5120,
10
- "initializer_range": 0.02,
11
- "intermediate_size": 13824,
12
- "max_position_embeddings": 2048,
13
- "max_sequence_length": 2048,
14
- "model_type": "llama",
15
- "num_attention_heads": 40,
16
- "num_hidden_layers": 40,
17
- "pad_token_id": -1,
18
- "rms_norm_eps": 1e-06,
19
- "tie_word_embeddings": false,
20
- "torch_dtype": "float32",
21
- "transformers_version": "4.28.1",
22
- "use_cache": true,
23
- "vocab_size": 32000
 
 
 
 
 
 
 
 
 
 
24
  }
 
1
  {
2
+ "_name_or_path": "airoboros-13b-gpt4-1.1",
3
+ "architectures": [
4
+ "LlamaForCausalLM"
5
+ ],
6
+ "bos_token_id": 0,
7
+ "eos_token_id": 1,
8
+ "hidden_act": "silu",
9
+ "hidden_size": 5120,
10
+ "initializer_range": 0.02,
11
+ "intermediate_size": 13824,
12
+ "max_position_embeddings": 2048,
13
+ "max_sequence_length": 2048,
14
+ "model_type": "llama",
15
+ "num_attention_heads": 40,
16
+ "num_hidden_layers": 40,
17
+ "pad_token_id": -1,
18
+ "rms_norm_eps": 1e-06,
19
+ "tie_word_embeddings": false,
20
+ "torch_dtype": "float32",
21
+ "transformers_version": "4.28.1",
22
+ "use_cache": true,
23
+ "vocab_size": 32000,
24
+ "quantization_config": {
25
+ "bits": 4,
26
+ "group_size": 128,
27
+ "damp_percent": 0.01,
28
+ "desc_act": false,
29
+ "sym": true,
30
+ "true_sequential": true,
31
+ "model_file_base_name": "model",
32
+ "quant_method": "gptq"
33
+ }
34
  }
airoboros-13b-1.1-GPTQ-4bit-128g.no-act.order.safetensors → model.safetensors RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:3838049b93cd627b0c6621ce736a7de5327325c11f614a52376ce3ad237f1d47
3
- size 8110988216
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8537ce34a1f54ed9b6f3db8ab1a6c989a62dcea3e988899ed536d25f5b0a4d97
3
+ size 8110988272
quantize_config.json CHANGED
@@ -1,8 +1,9 @@
1
  {
2
- "bits": 4,
3
- "group_size": 128,
4
- "damp_percent": 0.01,
5
- "desc_act": false,
6
- "sym": true,
7
- "true_sequential": true
 
8
  }
 
1
  {
2
+ "bits": 4,
3
+ "group_size": 128,
4
+ "damp_percent": 0.01,
5
+ "desc_act": false,
6
+ "sym": true,
7
+ "true_sequential": true,
8
+ "model_file_base_name": "model"
9
  }