Run this model with HF Jobs

Run togethercomputer/GPT-NeoXT-Chat-Base-20B on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.

Paste one of these prompts into your coding agent:

Fine-tune on my dataset

Use HF Jobs and TRL to fine-tune https://huggingface.co/togethercomputer/GPT-NeoXT-Chat-Base-20B. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.

Run batch inference

Use HF Jobs to run batch inference with https://huggingface.co/togethercomputer/GPT-NeoXT-Chat-Base-20B on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.

Evaluate on a benchmark

Use HF Jobs to evaluate https://huggingface.co/togethercomputer/GPT-NeoXT-Chat-Base-20B. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.

Quantize for lower memory use

Use HF Jobs to create a 4-bit version of https://huggingface.co/togethercomputer/GPT-NeoXT-Chat-Base-20B. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.

What kind of machine would be suitable for this model (in amazon sagemaker)?

#7
by juusohugs - opened

For simply to try deployment and inference with up to 500 words. Any help?

Hi! The model has approximately 20 billion parameters and thus loading the model in FP16 format would require approximately 40GB of VRAM, with additional memory required for inference.
However, if you allow some loss of precision, you can also try 8bit quantization which should halve the memory footprint.
After installing accelerate and bitsandbytes, just try to load the model as follows:

model = AutoModelForCausalLM.from_pretrained('togethercomputer/GPT-NeoXT-Chat-Base-20B', device_map="auto", load_in_8bit=True)

Thanks for the help. Managed to deploy OK but unfortunately getting an error during inference (I deployed using very big instances (ml.g4dn.12xlarge that has 48 vCPU and 192 GiB mem). I wonder if the huggingface version (amazon supports up to transformers_version="4.17.0") is a problem or if there's something else going on.

I could deploy & do inference just fine on neo 125MB model, but this big 20B model is causing an error during inference:

ModelError: An error occurred (ModelError) when calling the InvokeEndpoint operation: Received client error (400) from primary with message "{ "code": 400, "type": "InternalServerException", "message": "\u0027gpt_neox\u0027" }

It seems that most likely the problem is with the version. (Cross-posting this same link) ...here's a potential solution:

https://towardsdatascience.com/unlock-the-latest-transformer-models-with-amazon-sagemaker-7fe65130d993

HI, were you able to solve this with the above solution?

It appears that 8-bit quantization works well on version 4.22.1, but not on version 4.21.1. So it is likely a version issue.

Sign up or log in to comment