Using Large Language Models at NAS

Article ID: 710
Last updated: 21 Jul, 2025

Introduction

Large language models (LLMs) are an AI/Ml innovation that has the potential to enhance scientific discovery. One way to use LLMs in the NAS environment is through the Hugging Face application programming interface (API).

Hugging Face

Hugging Face is a platform for machine learning, comprised of multiple python packages that can help train, deploy, and host open-source and licensed machine learning models.

The Hugging Face Hub hosts over 120,000 pretrained models, datasets, and demo spaces that are all open source and publicly available. To help manage and use these pretrained models at NAS, a shared space is used to access a selection of these models curated by NAS experts. For more information, see Hugging Face and Hugging Face Hub.

To access Hugging Face, we have added the appropriate Hugging Face libraries to the available PyTorch and TensorFlow conda environments. When these conda environments are activated, the following environment variables are set:

export HF_HUB_CACHE = /nobackupp27/analytix/hugging_face/hub
export HF_HUB_OFFLINE = 1

These variables set the default location where Hugging Face stores and accesses models. You can access shared models and turn off network connectivity, which is required in order to run Hugging Face at NAS.

TIP: You can also access the hub cache from your own conda environment with Hugging Face installed, if you set the above environment variables before loading Hugging Face.

The following open-source models are currently available in the NAS environment:

Purpose Model
Masked Language Modelling google-bert/bert-base-uncased
google-bert/bert-base-cased
FacebookAI/roberta-base
microsoft/deberta-v3-base
distilbert/distilbert-base-uncased
distilbert/distilbert-base-cased
Translation google-t5/t5-base
Text Generation openai-community/gpt2
meta-llama/Meta-Llama-3-8B
meta-llama/Meta-Llama-3-70B
meta-llama/Meta-Llama-3-70B-Instruct
google/gemma-7b
Speech Recognition openai/whisper-large-v3

To load these models, use the transformers library. You can load the models with the pipeline function for easy inference, or you can load them with the trainer function for fine-tuning with your own dataset. For more information on using the transformers library, see:

To request more open source models be added to this repository, send email to our Data Analytics team with the requested model.

Contact Us

General User Assistance

Security

  • Report security issues 24x7x365
  • Toll-free: 1-877-NASA-SEC (1-877-627-2732)
  • E-mail: soc@nasa.gov

User Documentation

High-End Computing Capability (HECC) Portfolio Office

NASA High-End Computing Program

Tell Us About It

Our goal is furnish all the information you need to efficiently and effectively use the HECC resources needed for your NASA computational projects.

We welcome your input on features and topics that you would like to see included on this website.

Please send us email with your wish list and other feedback.