Update README.md
Browse files
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 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
- **
|
34 |
-
- **
|
35 |
-
- **
|
36 |
-
- **
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
- **
|
139 |
-
- **
|
140 |
-
- **
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
|
|
|
|
|
|
|
|
|
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
|