bartowski commited on
Commit
3e50ece
·
verified ·
1 Parent(s): 2083ad7

Upload folder using huggingface_hub

Browse files
.gitattributes CHANGED
@@ -41,3 +41,5 @@ Llama-3-SEC-Chat-Q8_0.gguf/Llama-3-SEC-Chat-Q8_0-00001-of-00002.gguf filter=lfs
41
  Llama-3-SEC-Chat-Q8_0.gguf/Llama-3-SEC-Chat-Q8_0-00002-of-00002.gguf filter=lfs diff=lfs merge=lfs -text
42
  Llama-3-SEC-Chat-Q8_0-00001-of-00002.gguf filter=lfs diff=lfs merge=lfs -text
43
  Llama-3-SEC-Chat-Q8_0-00002-of-00002.gguf filter=lfs diff=lfs merge=lfs -text
 
 
 
41
  Llama-3-SEC-Chat-Q8_0.gguf/Llama-3-SEC-Chat-Q8_0-00002-of-00002.gguf filter=lfs diff=lfs merge=lfs -text
42
  Llama-3-SEC-Chat-Q8_0-00001-of-00002.gguf filter=lfs diff=lfs merge=lfs -text
43
  Llama-3-SEC-Chat-Q8_0-00002-of-00002.gguf filter=lfs diff=lfs merge=lfs -text
44
+ Llama-3-SEC-Chat-Q6_K-00001-of-00002.gguf filter=lfs diff=lfs merge=lfs -text
45
+ Llama-3-SEC-Chat-Q6_K-00002-of-00002.gguf filter=lfs diff=lfs merge=lfs -text
Llama-3-SEC-Chat-Q2_K.gguf CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:2388299539bee95b9f41ca6d9adada02b9e2a48a6240cb2279fd237b145a8588
3
- size 26375127872
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b7115f4b06ee22462b696c85014e07ec3e4d200823a75c1ef384120d12e488d8
3
+ size 26375127168
Llama-3-SEC-Chat-Q3_K_M.gguf CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:75826022986ee01f49bf3aa49e683404af793bd3be32c2f7515905b06b5e85d0
3
- size 34267515328
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ce3d01c45b380483592620bd3b25436ed0408c97e5b02cbafe042acd7df7b2a8
3
+ size 34267514624
Llama-3-SEC-Chat-Q4_K_M.gguf CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:f85fdbbf66280e1e2828cd6aaa1bd6eeca8a875b976303912ef1427da0d2abac
3
- size 42520416832
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0d837400af161ba4136233db191330f2d77e297e079f0b6249e877c375cb56f3
3
+ size 42520416128
Llama-3-SEC-Chat-Q5_K_M.gguf CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:f0b793bd7a147183731a7dd7fedb839842d724cad24c2d5daf37677e4f8116db
3
- size 49949841984
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ef1ab51b4be43d72059ca3d7244ff8ee92d80d478255ca41ff98f07029540b27
3
+ size 49949841280
Llama-3-SEC-Chat-Q6_K-00001-of-00002.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6fbcf5534eb90a12beee95e54498de9edcfa18e7cf6961b593382244a202f1e5
3
+ size 39862712192
Llama-3-SEC-Chat-Q6_K-00002-of-00002.gguf ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:95147d8cd40b56c76ebe0991363072f92020c15aa7fadc6834cfa9efa3c77dbf
3
+ size 18025457984
Llama-3-SEC-Chat-Q8_0-00001-of-00002.gguf CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:8760ae4b0c8067f9756f6cf1fa27eee2668c5e021af21ab2432edbd3930d3a45
3
- size 39808953984
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d4c0c98bcf1fbd4d19ac83ea7eb44812fd5c10a3ad0419e5da2708c9982815d2
3
+ size 39808953280
README.md CHANGED
@@ -8,119 +8,94 @@ tags:
8
  - continual_pre_training
9
  datasets:
10
  - SEC_filings
 
 
11
  ---
12
 
13
- <img src="https://i.ibb.co/kHtBmDN/w8m6-X4-HCQRa-IR86ar-Cm5gg.webp" width="600" />
14
 
15
- # GGUF Quantizations for Llama-3-SEC: A Domain-Specific Chat Agent for SEC Data Analysis
16
 
17
- Llama-3-SEC is a state-of-the-art domain-specific large language model trained on a vast corpus of SEC (Securities and Exchange Commission) data. Built upon the powerful Meta-Llama-3-70B-Instruct model, Llama-3-SEC has been developed to provide unparalleled insights and analysis capabilities for financial professionals, investors, researchers, and anyone working with SEC filings and related financial data.
18
 
19
- GGUF files converted with <a href="https://github.com/ggerganov/llama.cpp/">llama.cpp</a> release <a href="https://github.com/ggerganov/llama.cpp/releases/tag/b3166">b3166</a>. Imatrix calibrated with the dataset found [here](https://gist.github.com/bartowski1182/eb213dccb3571f863da82e99418f81e8).
20
 
21
- ## Model Details
22
 
23
- - **Base Model:** Meta-Llama-3-70B-Instruct
24
- - **Training Data:** 19B tokens of SEC filings data, carefully mixed with 1B tokens of general data from Together AI's RedPajama dataset: [RedPajama-Data-1T](https://huggingface.co/datasets/togethercomputer/RedPajama-Data-1T) to maintain a balance between domain-specific knowledge and general language understanding.
25
- - **Training Method:** Continual Pre-Training (CPT) using the Megatron-Core framework, followed by model merging with the base model using the state-of-the-art TIES merging technique in the Arcee Mergekit toolkit. It then underwent supervised fine-tuning on an 8xH100 node using [Spectrum](https://arxiv.org/abs/2406.06623). We used a mixture of custom domain specific and general open-source datasets.
26
- - **Training Infrastructure:** AWS SageMaker HyperPod cluster with 4 nodes, each equipped with 32 H100 GPUs, ensuring efficient and scalable training of this massive language model.
27
-
28
- ## Use Cases
29
-
30
- Llama-3-SEC is designed to assist with a wide range of tasks related to SEC data analysis, including but not limited to:
31
-
32
- - In-depth investment analysis and decision support
33
- - Comprehensive risk management and assessment
34
- - Ensuring regulatory compliance and identifying potential violations
35
- - Studying corporate governance practices and promoting transparency
36
- - Conducting market research and tracking industry trends
37
-
38
- The model's deep understanding of SEC filings and related financial data makes it an invaluable tool for anyone working in the financial sector, providing powerful natural language processing capabilities tailored to the specific needs of this domain.
39
-
40
- ## Evaluation
41
-
42
- To ensure the robustness and effectiveness of Llama-3-SEC, the model has undergone rigorous evaluation on both domain-specific and general benchmarks. Key evaluation metrics include:
43
-
44
- - Domain-specific perplexity, measuring the model's performance on SEC-related data
45
-
46
- <img src="https://i.ibb.co/K5d0wMh/Screenshot-2024-06-11-at-10-23-18-PM.png" width="600">
47
-
48
- - Extractive numerical reasoning tasks, using subsets of TAT-QA and ConvFinQA datasets
49
-
50
- <img src="https://i.ibb.co/xGHRfLf/Screenshot-2024-06-11-at-10-23-59-PM.png" width="600">
51
-
52
- - General evaluation metrics, such as BIG-bench, AGIEval, GPT4all, and TruthfulQA, to assess the model's performance on a wide range of tasks
53
 
54
- <img src="https://i.ibb.co/2v6PdDx/Screenshot-2024-06-11-at-10-25-03-PM.png" width="600">
55
 
56
- These results demonstrate significant improvements in domain-specific performance while maintaining strong general capabilities, thanks to the use of advanced CPT and model merging techniques.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
57
 
58
- ## Training and Inference
 
 
59
 
60
- Llama-3-SEC has been trained using the chatml chat template. This template ensures that the model maintains its strong conversational abilities while incorporating the domain-specific knowledge acquired during the CPT process.
61
 
62
- To run inference with the Llama-3-SEC model using the chatml chat template, you can use the following code:
 
 
63
 
64
- ```python
65
- from transformers import AutoModelForCausalLM, AutoTokenizer
66
- device = "cuda"
67
 
68
- model_name = "arcee-ai/Llama-3-SEC"
 
 
69
 
70
- model = AutoModelForCausalLM.from_pretrained(
71
- model_name,
72
- torch_dtype="auto",
73
- device_map="auto"
74
- )
75
- tokenizer = AutoTokenizer.from_pretrained(model_name)
76
 
77
- prompt = "What are the key regulatory considerations for a company planning to conduct an initial public offering (IPO) in the United States?"
78
- messages = [
79
- {"role": "system", "content": "You are an expert financial assistant - specializing in governance and regulatory domains."},
80
- {"role": "user", "content": prompt}
81
- ]
82
- text = tokenizer.apply_chat_template(
83
- messages,
84
- tokenize=False,
85
- add_generation_prompt=True
86
- )
87
- model_inputs = tokenizer([text], return_tensors="pt").to(device)
88
 
89
- generated_ids = model.generate(
90
- model_inputs.input_ids,
91
- max_new_tokens=512
92
- )
93
- generated_ids = [
94
- output_ids[len(input_ids):] for input_ids, output_ids in zip(model_inputs.input_ids, generated_ids)
95
- ]
96
 
97
- response = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0]
98
- ```
99
 
100
- ## Limitations and Future Work
101
 
102
- This release represents the initial checkpoint of the Llama-3-SEC model, trained on 20B tokens of SEC data. Additional checkpoints will be released in the future as training on the full 70B token dataset is completed. Future work will focus on further improvements to the CPT data processing layer, exploration of advanced model merging techniques, and alignment of CPT models with SFT, DPO, and other cutting-edge alignment methods to further enhance the model's performance and reliability.
103
 
104
- ## Usage
105
 
106
- The model is available for both commercial and non-commercial use under the Llama-3 license. We encourage users to explore the model's capabilities and provide feedback to help us continuously improve its performance and usability. For more information - please see our detailed blog on Llama-3-SEC.
107
 
108
- **Note:** We trained Llama-3-SEC to be very compliant with system prompts. We have included a default system prompt, but if you wish to tailor answers to what your specific use case is, creating a system prompt that outlines your desired behavior is recommended.
109
 
110
- **Disclaimer:** Llama-3-SEC is a large language model (LLM) designed to assist with SEC data analysis. Users are solely responsible for any actions taken as a result of using Llama-3-SEC. Always double-check model responses.
111
 
112
- ## Citation
113
 
114
- If you use this model in your research or applications, please cite:
115
 
116
- ```bibtex
117
- @misc{Introducing_SEC_Data_Chat_Agent,
118
- title={Introducing the Ultimate SEC Data Chat Agent: Revolutionizing Financial Insights},
119
- author={Shamane Siriwardhana and Luke Mayers and Thomas Gauthier and Jacob Solawetz and Tyler Odenthal and Anneketh Vij and Lucas Atkins and Charles Goddard and Mary MacCarthy and Mark McQuade},
120
- year={2024},
121
- note={Available at: \url{firstname@arcee.ai}},
122
- url={URL after published}
123
- }
124
- ```
125
 
126
- For further information or inquiries, please contact the authors at their respective email addresses (firstname@arcee.ai). We look forward to seeing the exciting applications and research that will emerge from the use of Llama-3-SEC in the financial domain.
 
8
  - continual_pre_training
9
  datasets:
10
  - SEC_filings
11
+ quantized_by: bartowski
12
+ pipeline_tag: text-generation
13
  ---
14
 
15
+ ## Llamacpp imatrix Quantizations of Llama-3-SEC-Chat
16
 
17
+ Using <a href="https://github.com/ggerganov/llama.cpp/">llama.cpp</a> release <a href="https://github.com/ggerganov/llama.cpp/releases/tag/b3166">b3166</a> for quantization.
18
 
19
+ Original model: https://huggingface.co/arcee-ai/Llama-3-SEC-Chat
20
 
21
+ All quants made using imatrix option with dataset from [here](https://gist.github.com/bartowski1182/eb213dccb3571f863da82e99418f81e8)
22
 
23
+ ## Prompt format
24
 
25
+ ```
26
+ <|im_start|>system
27
+ {system_prompt}<|im_end|>
28
+ <|im_start|>user
29
+ {prompt}<|im_end|>
30
+ <|im_start|>assistant
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
31
 
32
+ ```
33
 
34
+ ## Download a file (not the whole branch) from below:
35
+
36
+ | Filename | Quant type | File Size | Description |
37
+ | -------- | ---------- | --------- | ----------- |
38
+ | [Llama-3-SEC-Chat-Q8_0.gguf](https://huggingface.co/bartowski/Llama-3-SEC-Chat-GGUF/tree/main/Llama-3-SEC-Chat-Q8_0.gguf) | Q8_0 | 74.97GB | Extremely high quality, generally unneeded but max available quant. |
39
+ | [Llama-3-SEC-Chat-Q6_K.gguf](https://huggingface.co/bartowski/Llama-3-SEC-Chat-GGUF/tree/main/Llama-3-SEC-Chat-Q6_K.gguf) | Q6_K | 57.88GB | Very high quality, near perfect, *recommended*. |
40
+ | [Llama-3-SEC-Chat-Q5_K_L.gguf](https://huggingface.co/bartowski/Llama-3-SEC-Chat-GGUF//main/Llama-3-SEC-Chat-Q5_K_L.gguf) | Q5_K_L | | *Experimental*, uses f16 for embed and output weights. Please provide any feedback of differences. High quality, *recommended*. |
41
+ | [Llama-3-SEC-Chat-Q5_K_M.gguf](https://huggingface.co/bartowski/Llama-3-SEC-Chat-GGUF/blob/main/Llama-3-SEC-Chat-Q5_K_M.gguf) | Q5_K_M | 49.94GB | High quality, *recommended*. |
42
+ | [Llama-3-SEC-Chat-Q4_K_L.gguf](https://huggingface.co/bartowski/Llama-3-SEC-Chat-GGUF//main/Llama-3-SEC-Chat-Q4_K_L.gguf) | Q4_K_L | | *Experimental*, uses f16 for embed and output weights. Please provide any feedback of differences. Good quality, uses about 4.83 bits per weight, *recommended*. |
43
+ | [Llama-3-SEC-Chat-Q4_K_M.gguf](https://huggingface.co/bartowski/Llama-3-SEC-Chat-GGUF/blob/main/Llama-3-SEC-Chat-Q4_K_M.gguf) | Q4_K_M | 42.52GB | Good quality, uses about 4.83 bits per weight, *recommended*. |
44
+ | [Llama-3-SEC-Chat-IQ4_XS.gguf](https://huggingface.co/bartowski/Llama-3-SEC-Chat-GGUF//main/Llama-3-SEC-Chat-IQ4_XS.gguf) | IQ4_XS | | Decent quality, smaller than Q4_K_S with similar performance, *recommended*. |
45
+ | [Llama-3-SEC-Chat-Q3_K_M.gguf](https://huggingface.co/bartowski/Llama-3-SEC-Chat-GGUF/blob/main/Llama-3-SEC-Chat-Q3_K_M.gguf) | Q3_K_M | 34.26GB | Even lower quality. |
46
+ | [Llama-3-SEC-Chat-IQ3_M.gguf](https://huggingface.co/bartowski/Llama-3-SEC-Chat-GGUF//main/Llama-3-SEC-Chat-IQ3_M.gguf) | IQ3_M | | Medium-low quality, new method with decent performance comparable to Q3_K_M. |
47
+ | [Llama-3-SEC-Chat-Q3_K_S.gguf](https://huggingface.co/bartowski/Llama-3-SEC-Chat-GGUF//main/Llama-3-SEC-Chat-Q3_K_S.gguf) | Q3_K_S | | Low quality, not recommended. |
48
+ | [Llama-3-SEC-Chat-IQ3_XXS.gguf](https://huggingface.co/bartowski/Llama-3-SEC-Chat-GGUF//main/Llama-3-SEC-Chat-IQ3_XXS.gguf) | IQ3_XXS | | Lower quality, new method with decent performance, comparable to Q3 quants. |
49
+ | [Llama-3-SEC-Chat-Q2_K.gguf](https://huggingface.co/bartowski/Llama-3-SEC-Chat-GGUF/blob/main/Llama-3-SEC-Chat-Q2_K.gguf) | Q2_K | 26.37GB | Very low quality but surprisingly usable. |
50
+ | [Llama-3-SEC-Chat-IQ2_M.gguf](https://huggingface.co/bartowski/Llama-3-SEC-Chat-GGUF//main/Llama-3-SEC-Chat-IQ2_M.gguf) | IQ2_M | | Very low quality, uses SOTA techniques to also be surprisingly usable. |
51
+ | [Llama-3-SEC-Chat-IQ2_XS.gguf](https://huggingface.co/bartowski/Llama-3-SEC-Chat-GGUF//main/Llama-3-SEC-Chat-IQ2_XS.gguf) | IQ2_XS | | Lower quality, uses SOTA techniques to be usable. |
52
+ | [Llama-3-SEC-Chat-IQ2_XXS.gguf](https://huggingface.co/bartowski/Llama-3-SEC-Chat-GGUF//main/Llama-3-SEC-Chat-IQ2_XXS.gguf) | IQ2_XXS | | Lower quality, uses SOTA techniques to be usable. |
53
+ | [Llama-3-SEC-Chat-IQ1_M.gguf](https://huggingface.co/bartowski/Llama-3-SEC-Chat-GGUF//main/Llama-3-SEC-Chat-IQ1_M.gguf) | IQ1_M | | Extremely low quality, *not* recommended. |
54
+
55
+ ## Downloading using huggingface-cli
56
+
57
+ First, make sure you have hugginface-cli installed:
58
 
59
+ ```
60
+ pip install -U "huggingface_hub[cli]"
61
+ ```
62
 
63
+ Then, you can target the specific file you want:
64
 
65
+ ```
66
+ huggingface-cli download bartowski/Llama-3-SEC-Chat-GGUF --include "Llama-3-SEC-Chat-Q4_K_M.gguf" --local-dir ./
67
+ ```
68
 
69
+ If the model is bigger than 50GB, it will have been split into multiple files. In order to download them all to a local folder, run:
 
 
70
 
71
+ ```
72
+ huggingface-cli download bartowski/Llama-3-SEC-Chat-GGUF --include "Llama-3-SEC-Chat-Q8_0.gguf/*" --local-dir Llama-3-SEC-Chat-Q8_0
73
+ ```
74
 
75
+ You can either specify a new local-dir (Llama-3-SEC-Chat-Q8_0) or download them all in place (./)
 
 
 
 
 
76
 
77
+ ## Which file should I choose?
 
 
 
 
 
 
 
 
 
 
78
 
79
+ A great write up with charts showing various performances is provided by Artefact2 [here](https://gist.github.com/Artefact2/b5f810600771265fc1e39442288e8ec9)
 
 
 
 
 
 
80
 
81
+ The first thing to figure out is how big a model you can run. To do this, you'll need to figure out how much RAM and/or VRAM you have.
 
82
 
83
+ If you want your model running as FAST as possible, you'll want to fit the whole thing on your GPU's VRAM. Aim for a quant with a file size 1-2GB smaller than your GPU's total VRAM.
84
 
85
+ If you want the absolute maximum quality, add both your system RAM and your GPU's VRAM together, then similarly grab a quant with a file size 1-2GB Smaller than that total.
86
 
87
+ Next, you'll need to decide if you want to use an 'I-quant' or a 'K-quant'.
88
 
89
+ If you don't want to think too much, grab one of the K-quants. These are in format 'QX_K_X', like Q5_K_M.
90
 
91
+ If you want to get more into the weeds, you can check out this extremely useful feature chart:
92
 
93
+ [llama.cpp feature matrix](https://github.com/ggerganov/llama.cpp/wiki/Feature-matrix)
94
 
95
+ But basically, if you're aiming for below Q4, and you're running cuBLAS (Nvidia) or rocBLAS (AMD), you should look towards the I-quants. These are in format IQX_X, like IQ3_M. These are newer and offer better performance for their size.
96
 
97
+ These I-quants can also be used on CPU and Apple Metal, but will be slower than their K-quant equivalent, so speed vs performance is a tradeoff you'll have to decide.
98
 
99
+ The I-quants are *not* compatible with Vulcan, which is also AMD, so if you have an AMD card double check if you're using the rocBLAS build or the Vulcan build. At the time of writing this, LM Studio has a preview with ROCm support, and other inference engines have specific builds for ROCm.
 
 
 
 
 
 
 
 
100
 
101
+ Want to support my work? Visit my ko-fi page here: https://ko-fi.com/bartowski