Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tensor parallelism generates non-sensical outputs #1663

Open
rasbt opened this issue Aug 8, 2024 · 1 comment
Open

Tensor parallelism generates non-sensical outputs #1663

rasbt opened this issue Aug 8, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@rasbt
Copy link
Collaborator

rasbt commented Aug 8, 2024

Bug description

For some reason, the tensor parallel implementation generates non-sensical outputs

⚡ python-api-tensor-parallel ~/litgpt litgpt generate_tp checkpoints/microsoft/phi-2 
...
Instruct: What food do llamas eat?
Output: When the
.

The first

.

The first

.

Time for inference 1: 1.31 sec total, 15.23 tokens/sec

Expected output (e.g., via base or sequential generation):

Instruct: What food do llamas eat?
Output: Llamas eat grass, shrubs, and other vegetation.

What operating system are you using?

Linux

LitGPT Version

Current main branch

@rasbt rasbt added the bug Something isn't working label Aug 8, 2024
@rasbt
Copy link
Collaborator Author

rasbt commented Aug 8, 2024

It seems to be related to the MLP class:

Has problem:

  • microsoft/phi-2

    • GptNeoxMLP
  • EleutherAI/pythia-2.8b

    • GptNeoxMLP
  • stabilityai/stablelm-base-alpha-7b

    • GptNeoxMLP
  • google/gemma-2-2b

    • GemmaMLP

Is fine:

  • meta-llama/Meta-Llama-3.1-8B-Instruct

    • LLaMAMLP
  • openlm-research/open_llama_3b

    • LLaMAMLP
  • microsoft/Phi-3-mini-4k-instruct

    • LLaMAMLP
  • garage-bAInd/Platypus2-7B

    • LLaMAMLP

It could be that this could automatically get fixed via #1421

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant