GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - openrightorg/JAX_llama: Inference code for LLaMA models in JAX

BranchesTags
Open more actions menu
 
 

Latest commit

 

History

22 Commits
22 Commits

Folders and files

NameName
Last commit message
Last commit date
jax_llama
jax_llama
 
 
.gitignore
.gitignore
 
 
CODE_OF_CONDUCT.md
CODE_OF_CONDUCT.md
 
 
CONTRIBUTING.md
CONTRIBUTING.md
 
 
LICENSE
LICENSE
 
 
MODEL_CARD.md
MODEL_CARD.md
 
 
README.md
README.md
 
 
convert.sh
convert.sh
 
 
download.sh
download.sh
 
 
jax_example.py
jax_example.py
 
 
jax_test.py
jax_test.py
 
 
requirements.txt
requirements.txt
 
 
setup.py
setup.py
 
 

Repository files navigation

LLaMA Jax

This repository is a Huggingface compatible port of LLaMA (arXiv) models to Jax. In order to download the checkpoints and tokenizer for LLaMA, fill this google form

Setup

In a conda env, run

pip install -r requirements.txt

Then in this repository

pip install -e .

Download

Once your request is approved, you will receive links to download the tokenizer and model files. Edit the download.sh script with the signed url provided in the email to download the model weights and tokenizer.

Inference

The provided jax_example.py will output completions for two pre-defined prompts. Using TARGET_FOLDER as defined in download.sh:

python jax_example.py --ckpt_dir $TARGET_FOLDER/model_size --tokenizer_path $TARGET_FOLDER/tokenizer.model

Model Card

See MODEL_CARD.md

License

See the LICENSE file.

Testing

The provided jax_test.py script runs a comparison between this jax model and the pytorch version provided by Meta. To run the tests, install Meta's code in the same environment and run the script with:

torchrun --nproc_per_node MP jax_test.py --ckpt_dir $TARGET_FOLDER/model_size --tokenizer_path $TARGET_FOLDER/tokenizer.model

(Note: some of the tests only run when MP=1)

Different models require different MP values:

Model MP
7B 1
13B 2
33B 4
65B 8

About

Inference code for LLaMA models in JAX

Resources

Readme
License

Code of conduct

Code of conduct

Contributing

Contributing
Activity
Custom properties

Stars

0 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.