Supplementary material for paper "Can LLMs Predict Citation Intent? An Experimental Analysis of In-context Learning and Fine-tuning on Open LLMs".
SciCite | ACL-ARC | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
Support for additional inference providers is under development
-
Configure Models
The default configuration includes all models used in the paper
- Open
experimental-configs/models.q8.json
- Select your target models and specify their context lengths
- Open
-
Model Installation - Choose one of these methods to download the required models:
- Use the LM Studio UI
- Run the command:
lms get <model-name>
-
Experiment Configuration
In the default configuration, all parameters are selected
- Open
experimental-configs\experimens-cfg.json
- Select your desired evaluation parameters
- Open
- Navigate to the root directory
- Execute the evaluation script:
python citation_intent_classification_experiments.py
- LLaMA-Factory (commit:
24c7842
) - All LLaMA-Factory dependencies installed
LLaMA-Factory is very quick to iterate, so later versions may not be totally compatible with the current config files - although the changes are usually very minor).
The training parameters in
llama-factory-configs/{dataset}/training_args.yaml
are platform-independent and can be used with any Supervised Fine-tuning system.
- Copy Dataset Files
- Source locations:
datasets/aplaca_format_scicite/ └── scicite_train_alpaca.json └── scicite_dev_alpaca.json datasets/alpaca_format/acl-arc/ └── aclarc_train_alpaca.json └── aclarc_dev_alpaca.json
- Destination:
LLaMA-Factory/data/
- Source locations:
- Update Dataset Information
- Add the following to
LLaMA-Factory/data/dataset_info.json
:"scicite": { "file_name": "scicite_train_alpaca.json", "columns": { "prompt": "instruction", "query": "input", "response": "output", "system": "system" } }, "scicite-calibration": { "file_name": "scicite_dev_alpaca.json", "columns": { "prompt": "instruction", "query": "input", "response": "output", "system": "system" } }, "aclarc": { "file_name": "aclarc_train_alpaca.json", "columns": { "prompt": "instruction", "query": "input", "response": "output", "system": "system" } }, "aclarc-calibration": { "file_name": "aclarc_dev_alpaca.json", "columns": { "prompt": "instruction", "query": "input", "response": "output", "system": "system" } }
- Add the following to
- Create a new directory:
LLaMA-Factory/config/
- Copy all configuration files from
llama-factory-configs/
to the new directory
For this step consult the LLaMA-Factory docs as well.
Choose one of these methods:
- GUI Method
- Launch LLaMA Board interface
- Load your configuration
- Start training run
- CLI Method
llamafactory-cli train path/to/training_args.yaml
Export the model using the dev set of the selected dataset (either scicite_dev_alpaca.json
or aclarc_dev_alpaca.json
) as a calibration dataset
To create GGUF model versions, install llama.cpp and run:
python convert_hf_to_gguf_update.py