GALACTICA 30B Evol-Instruct
GALACTICA 30B fine-tuned on the Evol-Instruct 70k dataset.
The model card from the original Galactica repo can be found here, and the original paper here.
The HF dataset for Evol-Instruct-70k can be found here, and the original GitHub repo for WizardLM is here.
Model Details
The GALACTICA models are trained on a large-scale scientific corpus and are designed to perform scientific tasks. Evol-instruct-70k is a dataset of evolved instruction-response pairs generated via the Evol-Instruct framework using gpt-3.5-turbo.
Model Use
The GALACTICA model card specifies that the primary indended users of the GALACTICA models are researchers studying language models applied to the scientific domain, and it cautions against production use of GALACTICA without safeguards due to the potential for the model to produce inaccurate information. The original GALACTICA models are available under a non-commercial CC BY-NC 4.0 license, and models based on the Evol-Instruct-70k dataset are additionally subject to the OpenAI Terms of Service.
Example Outputs
Full Prompt:
### Instruction:
Write out and explain Maxwell's equations using markdown and latex syntax. Highlight the key implication of each equation.
### Response:
Response:
Maxwell's equations are a set of four equations that describe the behavior of electric and magnetic fields. Here are the equations in both markdown and latex syntax:
Gauss's Law for Electric Fields: This equation states that the divergence of the electric field E is proportional to the charge density Ο divided by the vacuum permittivity Ξ΅0. This means that if there is a non-zero charge density, there must be a non-zero electric field surrounding it.
Gauss's Law for Magnetic Fields: This equation states that the divergence of the magnetic field B is always zero. This means that magnetic monopoles do not exist, and magnetic fields are always created by the motion of electric charges.
Maxwell-Faraday Equation: This equation states that the curl of the electric field is equal to the negative of the time derivative of the magnetic field. This means that changing magnetic fields can create electric fields, and vice versa.
Ampere's Law with Maxwell's Addition: This equation states that the curl of the magnetic field is equal to the product of the vacuum permeability ΞΌ0 and the sum of the electric current density J and the time derivative of the electric field. This means that changing electric fields can create magnetic fields, and that electric currents can also create magnetic fields.
Implications
- Gauss's Laws imply that electric charges must be conserved, since the net charge in a closed system must always be zero.
- The Maxwell-Faraday Equation implies that electromagnetic waves can travel through space, since changing magnetic fields can create electric fields, which can create changing magnetic fields, and so on. This is the basis for radio waves, microwaves, and other forms of electromagnetic radiation.
- Ampere's Law with Maxwell's Addition implies that electric currents can create magnetic fields, which can create electric currents, and so on. This is the basis for electrical generators and transformers.
Overall, Maxwell's equations are a fundamental framework for understanding the behavior of electric and magnetic fields, and have important applications in fields such as electromagnetism, radio technology, and electrical engineering.
Training Data
This model was trained by fine-tuning pre-trained GALACTICA 30B on the Evol-Instruct-70k dataset. GALACTICA models were trained on 106 billion tokens of open-access scientific text and data, including papers, textbooks, scientific websites, encyclopedias, and more. Fine-tuning the base GALACTICA models on the 70k instruction-response pairs in the Evol-Instruct-70k dataset allows users to query the resulting model in an instruct-response fashion.
How to Use
The GALACTICA Evol-Instruct-70K weights are made available for use with the transformers
library.
Click to expand
# pip install accelerate
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("GeorgiaTechResearchInstitute/galactica-30b-evol-instruct-70k")
model = AutoModelForCausalLM.from_pretrained("GeorgiaTechResearchInstitute/galactica-30b-evol-instruct-70k", device_map="auto", torch_dtype=torch.bfloat16)
# the evol-instruct models were fine-tuned with the same hidden prompts as the Alpaca project
no_input_prompt_template = ("### Instruction:\n{instruction}\n\n### Response:")
prompt = "Write out Maxwell's equations and explain the meaning of each one."
formatted_prompt = no_input_prompt_template.format_map({'instruction': prompt})
tokenized_prompt = tokenizer(formatted_prompt, return_tensors="pt").input_ids.to(model.device)
out_tokens = model.generate(tokenized_prompt)
print(tokenizer.batch_decode(out_tokens, skip_special_tokens=False, clean_up_tokenization_spaces=False))
Training Resources
GALACTICA 30B Evol-Instruct was fine-tuned in 196 hours using 16 A100 80GB GPUs, 16-bit mixed-precision, an effective batch-size of 128, and with a maximum context window of 1024 tokens. This model was trained using DeepSpeed ZeRO-3 optimizations.
Performance and Limitations
Common benchmark scores generated using the Eleuther AI LLM Evaluation Harness.
Task | Version | Metric | Value | Stderr |
---|---|---|---|---|
MMLU 5-shot | 1 | acc | 0.4420 | |
arc_challenge 25-shot | 0 | acc | 0.4684 | 0.146 |
acc_norm | 0.4787 | 0.146 | ||
hellaswag 10-shot | 0 | acc | 0.4705 | 0.0050 |
acc_norm | 0.6111 | 0.0049 |
Qualitative evaluation suggests that the evol-instruct-70k fine-tuned Galactica models are signficantly more controllable and attentive to user prompts than the Alpaca fine-tuned GALPACA models.
Works Cited
@inproceedings{GALACTICA,
title={GALACTICA: A Large Language Model for Science},
author={Ross Taylor and Marcin Kardas and Guillem Cucurull and Thomas Scialom and Anthony Hartshorn and Elvis Saravia and Andrew Poulton and Viktor Kerkez and Robert Stojnic},
year={2022}
}
@misc{xu2023wizardlm,
title={WizardLM: Empowering Large Language Models to Follow Complex Instructions},
author={Can Xu and Qingfeng Sun and Kai Zheng and Xiubo Geng and Pu Zhao and Jiazhan Feng and Chongyang Tao and Daxin Jiang},
year={2023},
eprint={2304.12244},
archivePrefix={arXiv},
primaryClass={cs.CL}
}
- Downloads last month
- 9,321