jeffrey-fong commited on
Commit
f988626
1 Parent(s): 6508066

First commit

Browse files
README.md CHANGED
@@ -1,3 +1,64 @@
1
- ---
2
- license: apache-2.0
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Invoker-13B-GPTQ
2
+
3
+ This repo is a 4-bit quantized GPTQ implementation of [jeffrey-fong/invoker-13b](https://huggingface.co/jeffrey-fong/invoker-13b).
4
+
5
+ ## Model Description
6
+ Invoker is a suite of large language models based on Llama-2 and is finetuned to plan between calling functions and providing responses directly. It behaves similar to OpenAI's function-calling models which intelligently chooses the best function to call among a list of functions provided to it and summarizes the function responses.
7
+
8
+ This model stands out for its ability to plan between function calls and returning model responses directly. The fine-tuning process was performed with a 4096 sequence length on an 2x A100 80GB machine.
9
+
10
+ For more details, refer to [https://github.com/jeffrey-fong/Invoker](https://github.com/jeffrey-fong/Invoker)
11
+
12
+ ## Model Usage
13
+
14
+ #### Prompt Format
15
+ The prompt to the model consists of a list of available of functions to call and the chat messages
16
+
17
+ You must provide the list of functions to the model. All functions passed in should be in the same JSON format as OpenAI function-calling. If no functions are to be passed to the model, provide `None` in the `Available Functions` Field.
18
+
19
+ ````text
20
+ Available Functions:
21
+ ```json
22
+ <function1 name and description>
23
+ ```
24
+ ```json
25
+ <function2 name and description>
26
+ ```
27
+ A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions. The assistant calls functions with appropriate input when necessary.
28
+ USER: <query>
29
+ ASSISTANT:
30
+ ````
31
+
32
+ or
33
+
34
+ ```text
35
+ Available Functions:
36
+ None
37
+ A chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions. The assistant calls functions with appropriate input when necessary.
38
+ USER: <query>
39
+ ASSISTANT:
40
+ ```
41
+
42
+ ## Model Training
43
+ The model was trained using QLora which significantly reduces the computational resources required. Training was also accelerated using DeepSpeed Zero Stage 2 which provides fast data parallelism.
44
+
45
+ ## Training Data
46
+
47
+ We use a variety of sources when building our training dataset. All the datasets are carefully chosen to improve both the conversational and function-calling capability of the model.
48
+
49
+ #### ToolBench (0830 updated)
50
+
51
+ ToolBench is an open-source, large-scale and high quality instruction tuning SFT dataset to facilitate the training of LLMs with general tool-use capability. It consists of multi-turn conversations where the assistant, who is presented with several potential functions to call, will call one or multiple functions before returning its response to the user. We had undergone rigorous cleaning of the data where we
52
+ - Removed all datapoints that do not end with the assistant returning a summarized response
53
+ - Cleaned datapoints with unnecessary calls to the same function
54
+ - Changed all function names and descriptions to not include the domain name, so the functions feels more generic
55
+
56
+ #### ShareGPT-34K
57
+
58
+ ShareGPT-34K is a filtered dataset containing high quality multi-turn conversations between a user and an assistant. Some of the assistant responses are generated from OpenAI's GPT-3.5-Turbo while some are from GPT-4.
59
+
60
+ #### OASST1
61
+
62
+ OASST1 is a human-generated and human-annotated assistant-style conversation corpus. We filtered out the conversations in English.
63
+
64
+ All the datasets used are under Apache-2.0 License. Therefore, this dataset will also be under the same license.
config.json ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "jeffrey-fong/invoker-13b",
3
+ "architectures": [
4
+ "LlamaForCausalLM"
5
+ ],
6
+ "bos_token_id": 1,
7
+ "eos_token_id": 2,
8
+ "hidden_act": "silu",
9
+ "hidden_size": 5120,
10
+ "initializer_range": 0.02,
11
+ "intermediate_size": 13824,
12
+ "max_position_embeddings": 4096,
13
+ "model_type": "llama",
14
+ "num_attention_heads": 40,
15
+ "num_hidden_layers": 40,
16
+ "num_key_value_heads": 40,
17
+ "pad_token_id": 0,
18
+ "pretraining_tp": 1,
19
+ "rms_norm_eps": 1e-05,
20
+ "rope_scaling": null,
21
+ "tie_word_embeddings": false,
22
+ "torch_dtype": "float16",
23
+ "transformers_version": "4.31.0",
24
+ "use_cache": true,
25
+ "vocab_size": 32000
26
+ }
generation_config.json ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {
2
+ "_from_model_config": true,
3
+ "bos_token_id": 1,
4
+ "eos_token_id": 2,
5
+ "pad_token_id": 0,
6
+ "transformers_version": "4.31.0"
7
+ }
gptq_model-4bit-128g.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2e9fa9e4f522ed3c107a8f7db83cfecc57623fb532211e1240553d575d5f1fea
3
+ size 7259449576
quantize_config.json ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bits": 4,
3
+ "group_size": 128,
4
+ "damp_percent": 0.01,
5
+ "desc_act": false,
6
+ "static_groups": false,
7
+ "sym": true,
8
+ "true_sequential": true,
9
+ "model_name_or_path": null,
10
+ "model_file_base_name": null
11
+ }
special_tokens_map.json ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token": {
3
+ "content": "<s>",
4
+ "lstrip": false,
5
+ "normalized": true,
6
+ "rstrip": false,
7
+ "single_word": false
8
+ },
9
+ "eos_token": {
10
+ "content": "</s>",
11
+ "lstrip": false,
12
+ "normalized": true,
13
+ "rstrip": false,
14
+ "single_word": false
15
+ },
16
+ "unk_token": {
17
+ "content": "<unk>",
18
+ "lstrip": false,
19
+ "normalized": true,
20
+ "rstrip": false,
21
+ "single_word": false
22
+ }
23
+ }
tokenizer.model ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9e556afd44213b6bd1be2b850ebbbd98f5481437a8021afaf58ee7fb1818d347
3
+ size 499723
tokenizer_config.json ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_bos_token": true,
3
+ "add_eos_token": false,
4
+ "bos_token": {
5
+ "__type": "AddedToken",
6
+ "content": "<s>",
7
+ "lstrip": false,
8
+ "normalized": true,
9
+ "rstrip": false,
10
+ "single_word": false
11
+ },
12
+ "clean_up_tokenization_spaces": false,
13
+ "eos_token": {
14
+ "__type": "AddedToken",
15
+ "content": "</s>",
16
+ "lstrip": false,
17
+ "normalized": true,
18
+ "rstrip": false,
19
+ "single_word": false
20
+ },
21
+ "legacy": true,
22
+ "model_max_length": 1000000000000000019884624838656,
23
+ "pad_token": null,
24
+ "sp_model_kwargs": {},
25
+ "tokenizer_class": "LlamaTokenizer",
26
+ "unk_token": {
27
+ "__type": "AddedToken",
28
+ "content": "<unk>",
29
+ "lstrip": false,
30
+ "normalized": true,
31
+ "rstrip": false,
32
+ "single_word": false
33
+ }
34
+ }