Lightning-AI / Lightning-AI/pytorch-lightning

Example of running huggingface model with tensor parallel

Open
#20,831 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

3rd party feature question
Dominant language
Python
Stars
31.4k
Forks
3.8k
Avg merge
6d 7h
Merged PRs (30d)
6

Description

### Description & Motivation

I understand that there are current example available with Llama 3. https://github.com/Lightning-AI/pytorch-lightning/tree/master/examples/pytorch/tensor_parallel
However, with an in-house implementation of Llama and without the ability of loading a huggingface-format checkpoint (which is the de-facto industry standard), this toy example cannot be used in practice.

### Pitch

A working example of tensor parallelism / 2D parallelism with `transformers` model.

### Alternatives

_No response_

### Additional context

_No response_

cc @lantiga @borda

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the existing examples in examples/pytorch/tensor_parallel and the issue's requested Hugging Face model workflow. Determine how a transformers model and Hugging Face-format checkpoint should fit the tensor- or 2D-parallel example. Done means a working, usable example that runs with a transformers model and supports the stated checkpoint format.

Written by the indexing model from the issue text.

Assessment

Tech stack
huggingface, python, pytorch
Domain
distributed-systems, machine-learning
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.