LogCreative commited on
Commit
9d9d18c
·
verified ·
1 Parent(s): 6ef7e93

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +148 -144
README.md CHANGED
@@ -1,144 +1,148 @@
1
- ---
2
- base_model: unsloth/llama-3-8b-Instruct
3
- license: llama3
4
- datasets:
5
- - LogCreative/latex-pgfplots-instruct
6
- language:
7
- - en
8
- metrics:
9
- - code_eval
10
- library_name: peft
11
- pipeline_tag: text-generation
12
- tags:
13
- - code
14
- ---
15
-
16
- ## Usage
17
-
18
- This model is saved as [MLC LLM](https://llm.mlc.ai) format.
19
- View the [installation guide of MLC LLM](https://llm.mlc.ai/docs/install/mlc_llm) for how to install the library.
20
- Then use the following command to try the model:
21
- ```bash
22
- mlc_llm chat .
23
- ```
24
-
25
- ## Model Details
26
-
27
- ### Model Description
28
-
29
- <!-- Provide a longer summary of what this model is. -->
30
-
31
- The model is finetuned from Llama 3 LLM to provide more accurate results on generating LaTeX code of `pgfplots` package, which is based on the dataset [LogCreative/latex-pgfplots-instruct](https://huggingface.co/datasets/LogCreative/latex-pgfplots-instruct) extracted from the documentation of [`pgfplots`](https://github.com/pgf-tikz/pgfplots) LaTeX package.
32
-
33
- - **Developed by:** [LogCreative](https://github.com/LogCreative)
34
- - **Model type:** Text Generation
35
- - **Language(s) (NLP):** English
36
- - **License:** Llama 3
37
- - **Finetuned from model:** [unsloth/llama-3-8b-Instruct](https://huggingface.co/unsloth/llama-3-8b)
38
-
39
- ### Model Sources
40
-
41
- <!-- Provide the basic links for the model. -->
42
-
43
- - **Repository:** [LogCreative/llama-pgfplots-finetune](https://github.com/LogCreative/llama-pgfplots-finetune)
44
-
45
- ## Uses
46
-
47
- <!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
48
-
49
- This model is intended to generate the pgfplots LaTeX code according to the user's prompt.
50
- It is suitable for users who are not familiar with the API provided in the `pgfplots` package
51
- or does not want to consult the documentation for achieving the intention.
52
-
53
- ### Direct Use
54
-
55
- <!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
56
-
57
- [PGFPlotsEdt](https://github.com/LogCreative/PGFPlotsEdt): A PGFPlots Statistic Graph Interactive Editor.
58
-
59
- ### Out-of-Scope Use
60
-
61
- <!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
62
-
63
- Any use outside the `pgfplots` package could only be of the performance of the base Llama 3 model.
64
-
65
- ## Bias, Risks, and Limitations
66
-
67
- <!-- This section is meant to convey both technical and sociotechnical limitations. -->
68
-
69
- This model could not provide sufficient information on other LaTeX packages and could not guarantee the absolute correctness of the generated result.
70
-
71
- ### Recommendations
72
-
73
- <!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
74
-
75
- Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model.
76
- If you can not get the correct result from this model, you may need to consult the original `pgfplots` documentation for more information.
77
-
78
- ## Training Details
79
-
80
- ### Training Data
81
-
82
- <!-- This should link to a Dataset Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. -->
83
-
84
- [LogCreative/latex-pgfplots-instruct](https://huggingface.co/datasets/LogCreative/latex-pgfplots-instruct): a datasets contains the instruction and corresponding output related to `pgfplots` and `pgfplotstable` LaTeX packages.
85
-
86
- ### Training Procedure
87
-
88
- <!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
89
-
90
- This model is finetuned based on the dataset based on [`unsloth`](https://github.com/unslothai/unsloth) library.
91
-
92
- #### Training Hyperparameters
93
-
94
- - **Training regime:** bf16 mixed precision <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
95
-
96
- ## Evaluation
97
-
98
- <!-- This section describes the evaluation protocols and provides the results. -->
99
-
100
- The evaluation is based on the success compilation rate of the output LaTeX code in the test dataset.
101
-
102
- ### Testing Data, Factors & Metrics
103
-
104
- #### Testing Data
105
-
106
- <!-- This should link to a Dataset Card if possible. -->
107
-
108
- [LogCreative/latex-pgfplots-instruct](https://huggingface.co/datasets/LogCreative/latex-pgfplots-instruct): the test part of this dataset only contains instructions only related to the `pgfplots` package.
109
-
110
- #### Factors
111
-
112
- <!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
113
-
114
- When testing, the prompt prefix is added to tell the model what role it is and what the requested response format is to only output the code without any explanation.
115
-
116
- #### Metrics
117
-
118
- <!-- These are the evaluation metrics being used, ideally with a description of why. -->
119
-
120
- Success compilation rate: $\frac{\text{\#Success compilation}}{\text{\#Total compilation}}\times 100\%$. The uncessful compilation is rather LaTeX failure or the timeout case (compilation time > 20s).
121
-
122
- ### Results
123
-
124
- - Llama 3: 34%
125
- - **This model: 52% (+18%)**
126
-
127
- #### Summary
128
-
129
- This model is expected to output the LaTeX code output related to the `pgfplots` package with less error compared to the baseline Llama 3 model.
130
-
131
- ## Environmental Impact
132
-
133
- <!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
134
-
135
- Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700).
136
-
137
- - **Hardware Type:** Nvidia A100 80G
138
- - **Hours used:** 1h = 10min training + 50min testing
139
- - **Cloud Provider:** Private infrastructure
140
- - **Carbon Emitted:** 0.11kg CO2 eq.
141
-
142
- ### Framework versions
143
-
144
- - PEFT 0.11.1
 
 
 
 
 
1
+ ---
2
+ base_model: unsloth/llama-3-8b-Instruct
3
+ license: llama3
4
+ datasets:
5
+ - LogCreative/latex-pgfplots-instruct
6
+ language:
7
+ - en
8
+ metrics:
9
+ - code_eval
10
+ pipeline_tag: text-generation
11
+ tags:
12
+ - code
13
+ ---
14
+
15
+ ## Usage
16
+
17
+ This model is saved as [MLC LLM](https://llm.mlc.ai) format.
18
+ View the [installation guide of MLC LLM](https://llm.mlc.ai/docs/install/mlc_llm) for how to install the library.
19
+ Then use the following command to try the model:
20
+ ```bash
21
+ mlc_llm chat .
22
+ ```
23
+
24
+ ## Model Details
25
+
26
+ ### Model Description
27
+
28
+ <!-- Provide a longer summary of what this model is. -->
29
+
30
+ The model is finetuned from Llama 3 LLM to provide more accurate results on generating LaTeX code of `pgfplots` package, which is based on the dataset [LogCreative/latex-pgfplots-instruct](https://huggingface.co/datasets/LogCreative/latex-pgfplots-instruct) extracted from the documentation of [`pgfplots`](https://github.com/pgf-tikz/pgfplots) LaTeX package.
31
+
32
+ - **Developed by:** [LogCreative](https://github.com/LogCreative)
33
+ - **Model type:** Text Generation
34
+ - **Language(s) (NLP):** English
35
+ - **License:** Llama 3
36
+ - **Finetuned from model:** [unsloth/llama-3-8b-Instruct](https://huggingface.co/unsloth/llama-3-8b)
37
+
38
+ ### Model Sources
39
+
40
+ <!-- Provide the basic links for the model. -->
41
+
42
+ - **Repository:** [LogCreative/llama-pgfplots-finetune](https://github.com/LogCreative/llama-pgfplots-finetune)
43
+
44
+ ## Uses
45
+
46
+ <!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
47
+
48
+ This model is intended to generate the pgfplots LaTeX code according to the user's prompt.
49
+ It is suitable for users who are not familiar with the API provided in the `pgfplots` package
50
+ or does not want to consult the documentation for achieving the intention.
51
+
52
+ ### Direct Use
53
+
54
+ <!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
55
+
56
+ [PGFPlotsEdt](https://github.com/LogCreative/PGFPlotsEdt): A PGFPlots Statistic Graph Interactive Editor.
57
+
58
+ ### Out-of-Scope Use
59
+
60
+ <!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
61
+
62
+ Any use outside the `pgfplots` package could only be of the performance of the base Llama 3 model.
63
+
64
+ ## Bias, Risks, and Limitations
65
+
66
+ <!-- This section is meant to convey both technical and sociotechnical limitations. -->
67
+
68
+ This model could not provide sufficient information on other LaTeX packages and could not guarantee the absolute correctness of the generated result.
69
+
70
+ ### Recommendations
71
+
72
+ <!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
73
+
74
+ Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model.
75
+ If you can not get the correct result from this model, you may need to consult the original `pgfplots` documentation for more information.
76
+
77
+ ## Training Details
78
+
79
+ ### Training Data
80
+
81
+ <!-- This should link to a Dataset Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. -->
82
+
83
+ [LogCreative/latex-pgfplots-instruct](https://huggingface.co/datasets/LogCreative/latex-pgfplots-instruct): a datasets contains the instruction and corresponding output related to `pgfplots` and `pgfplotstable` LaTeX packages.
84
+
85
+ ### Training Procedure
86
+
87
+ <!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
88
+
89
+ This model is finetuned based on the dataset based on [`unsloth`](https://github.com/unslothai/unsloth) library.
90
+
91
+ #### Training Hyperparameters
92
+
93
+ - **Training regime:** bf16 mixed precision <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
94
+
95
+ ## Evaluation
96
+
97
+ <!-- This section describes the evaluation protocols and provides the results. -->
98
+
99
+ The evaluation is based on the success compilation rate of the output LaTeX code in the test dataset.
100
+
101
+ ### Testing Data, Factors & Metrics
102
+
103
+ #### Testing Data
104
+
105
+ <!-- This should link to a Dataset Card if possible. -->
106
+
107
+ [LogCreative/latex-pgfplots-instruct](https://huggingface.co/datasets/LogCreative/latex-pgfplots-instruct): the test part of this dataset only contains instructions only related to the `pgfplots` package.
108
+
109
+ #### Factors
110
+
111
+ <!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
112
+
113
+ When testing, the prompt prefix is added to tell the model what role it is and what the requested response format is to only output the code without any explanation.
114
+
115
+ #### Metrics
116
+
117
+ <!-- These are the evaluation metrics being used, ideally with a description of why. -->
118
+
119
+ Success compilation rate: $\frac{\text{\#Success compilation}}{\text{\#Total compilation}}\times 100\%$. The uncessful compilation is rather LaTeX failure or the timeout case (compilation time > 20s).
120
+
121
+ ### Results
122
+
123
+ The test is based upon unquantized model which is in fp16 precision.
124
+
125
+ - Llama 3: 34%
126
+ - **This model: 52% (+18%)**
127
+
128
+ #### Summary
129
+
130
+ This model is expected to output the LaTeX code output related to the `pgfplots` package with less error compared to the baseline Llama 3 model.
131
+
132
+ ## Environmental Impact
133
+
134
+ <!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
135
+
136
+ Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700).
137
+
138
+ - **Hardware Type:** Nvidia A100 80G
139
+ - **Hours used:** 1h = 10min training + 50min testing
140
+ - **Cloud Provider:** Private infrastructure
141
+ - **Carbon Emitted:** 0.11kg CO2 eq.
142
+
143
+ ### Framework versions
144
+
145
+ - PEFT 0.11.1
146
+ - MLC LLM nightly_cu122-0.1.dev1404
147
+ - MLC AI nightly_cu122-0.15.dev404
148
+ - Unsloth 2024.6