Giter Club home page Giter Club logo

Comments (2)

cabal-daniel avatar cabal-daniel commented on May 27, 2024

Maybe it's the fact precision is set to bf16-mixed?

from lit-llama.

cabal-daniel avatar cabal-daniel commented on May 27, 2024

Ran it again with bf16-true and got this error instead

[2023-11-03 19:13:17.491399] iter 7998: loss 0.8175, time: 1408.26ms
Validating ...
Traceback (most recent call last):
  File "/root/lit-llama/finetune/full.py", line 225, in <module>
    CLI(main)
  File "/root/.venv/lib/python3.10/site-packages/jsonargparse/_cli.py", line 96, in CLI
    return _run_component(components, cfg_init)
  File "/root/.venv/lib/python3.10/site-packages/jsonargparse/_cli.py", line 181, in _run_component
    return component(**cfg)
  File "/root/lit-llama/finetune/full.py", line 86, in main
    train(fabric, model, optimizer, train_data, val_data, out_dir)
  File "/root/lit-llama/finetune/full.py", line 131, in train
    val_loss = validate(fabric, model, val_data)
Traceback (most recent call last):
  File "/root/.venv/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 115, in decorate_context
  File "/root/lit-llama/finetune/full.py", line 225, in <module>
    return func(*args, **kwargs)
  File "/root/lit-llama/finetune/full.py", line 177, in validate
    output = generate_response(model, instruction)
  File "/root/lit-llama/finetune/full.py", line 152, in generate_response
    output = generate(
  File "/root/.venv/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 115, in decorate_context
Traceback (most recent call last):
  File "/root/lit-llama/finetune/full.py", line 225, in <module>
    CLI(main)
  File "/root/.venv/lib/python3.10/site-packages/jsonargparse/_cli.py", line 96, in CLI
    return func(*args, **kwargs)
  File "/root/lit-llama/generate.py", line 83, in generate
    return _run_component(components, cfg_init)
    idx = idx.index_copy(0, input_pos, idx_next)
  File "/root/.venv/lib/python3.10/site-packages/jsonargparse/_cli.py", line 181, in _run_component
RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cpu and cuda:0! (when checking argument for argument source in method wrapper_CUDA_index_copy)
    return component(**cfg)
  File "/root/lit-llama/finetune/full.py", line 86, in main
    train(fabric, model, optimizer, train_data, val_data, out_dir)
  File "/root/lit-llama/finetune/full.py", line 131, in train
    CLI(main)
  File "/root/.venv/lib/python3.10/site-packages/jsonargparse/_cli.py", line 96, in CLI
    val_loss = validate(fabric, model, val_data)
  File "/root/.venv/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 115, in decorate_context
    return _run_component(components, cfg_init)
    return func(*args, **kwargs)
  File "/root/.venv/lib/python3.10/site-packages/jsonargparse/_cli.py", line 181, in _run_component
  File "/root/lit-llama/finetune/full.py", line 177, in validate
    return component(**cfg)
    output = generate_response(model, instruction)
  File "/root/lit-llama/finetune/full.py", line 86, in main
  File "/root/lit-llama/finetune/full.py", line 152, in generate_response
    train(fabric, model, optimizer, train_data, val_data, out_dir)
  File "/root/lit-llama/finetune/full.py", line 131, in train
    output = generate(
  File "/root/.venv/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 115, in decorate_context
    return func(*args, **kwargs)
    val_loss = validate(fabric, model, val_data)
  File "/root/lit-llama/generate.py", line 83, in generate
  File "/root/.venv/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 115, in decorate_context
    idx = idx.index_copy(0, input_pos, idx_next)
    return func(*args, **kwargs)
  File "/root/lit-llama/finetune/full.py", line 177, in validate
RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cpu and cuda:3! (when checking argument for argument source in method wrapper_CUDA_index_copy)
    output = generate_response(model, instruction)
  File "/root/lit-llama/finetune/full.py", line 152, in generate_response
    output = generate(
  File "/root/.venv/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 115, in decorate_context
    return func(*args, **kwargs)
  File "/root/lit-llama/generate.py", line 83, in generate
    idx = idx.index_copy(0, input_pos, idx_next)
RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cpu and cuda:2! (when checking argument for argument source in method wrapper_CUDA_index_copy)
Traceback (most recent call last):
  File "/root/lit-llama/finetune/full.py", line 225, in <module>
    CLI(main)
  File "/root/.venv/lib/python3.10/site-packages/jsonargparse/_cli.py", line 96, in CLI
    return _run_component(components, cfg_init)
  File "/root/.venv/lib/python3.10/site-packages/jsonargparse/_cli.py", line 181, in _run_component
    return component(**cfg)
  File "/root/lit-llama/finetune/full.py", line 86, in main
    train(fabric, model, optimizer, train_data, val_data, out_dir)
  File "/root/lit-llama/finetune/full.py", line 131, in train
    val_loss = validate(fabric, model, val_data)
  File "/root/.venv/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 115, in decorate_context
    return func(*args, **kwargs)
  File "/root/lit-llama/finetune/full.py", line 177, in validate
    output = generate_response(model, instruction)
  File "/root/lit-llama/finetune/full.py", line 152, in generate_response
    output = generate(
  File "/root/.venv/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 115, in decorate_context
    return func(*args, **kwargs)
  File "/root/lit-llama/generate.py", line 83, in generate
    idx = idx.index_copy(0, input_pos, idx_next)
RuntimeError: Expected all tensors to be on the same device, but found at least two devices, cpu and cuda:1! (when checking argument for argument source in method wrapper_CUDA_index_copy)

from lit-llama.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.