Git Product home page Git Product logo

Comments (4)

xuzikun2003 avatar xuzikun2003 commented on July 23, 2024

Should I do something like this?

from transformers import AutoTokenizer, AutoModel, AutoConfig
from sat.training.model_io import save_checkpoint

config = AutoConfig.from_pretrained("THUDM/chatglm2-6b", trust_remote_code=True)

args = argparse.Namespace(
num_layers=config.num_layers,
vocab_size=config.vocab_size,
hidden_size=config.hidden_size,
num_attention_heads=config.num_attention_heads,
max_sequence_length=config.max_sequence_length,
bos_token_id=tokenizer.bos_token_id,
mask_token_id=tokenizer.mask_token_id,
gmask_token_id=tokenizer.gmask_token_id,
hidden_dropout=0.,
attention_dropout=0.,
inner_hidden_size=None,
hidden_size_per_attention_head=None,
checkpoint_activations=True,
checkpoint_num_layers=1,
layernorm_order='post',
model_parallel_size=1,
world_size=1,
rank=0,
skip_init=False,
use_gpu_initialization=True,
save='model_check_point',
deepspeed=None,
mode='inference',
tokenizer_type="THUDM/chatglm-6b")

from transformers import AutoTokenizer, AutoModel
tokenizer = AutoTokenizer.from_pretrained("visualglm-6b", trust_remote_code=True)
model = AutoModel.from_pretrained("visualglm-6b",trust_remote_code=True).half().quantize(8).cuda()

save_checkpoint(1, model, None, None, args)

from visualglm-6b.

1049451037 avatar 1049451037 commented on July 23, 2024

We don't have visualglm-6b/300. I don't know what code you are running.

from visualglm-6b.

xuzikun2003 avatar xuzikun2003 commented on July 23, 2024

We don't have visualglm-6b/300. I don't know what code you are running.

I ran the q-lora fine tuning script.
bash finetune/finetune_visualglm_qlora.sh
and got the above error.

from visualglm-6b.

1049451037 avatar 1049451037 commented on July 23, 2024

I don't know why. But our fine tuning script will never request visualglm-6b/300 files. I can only assume that you have changed the code or folder structure, which is out of my control.

from visualglm-6b.

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.