GithubHelp home page GithubHelp logo

Comments (5)

LZY-the-boys avatar LZY-the-boys commented on August 15, 2024

这个编译的时候是需要ggml.cpp/h和util.cpp/h的,我们提供了cmakelist和makefile,可以尝试一下

from chinese-vicuna.

yuxuan2015 avatar yuxuan2015 commented on August 15, 2024

@LZY-the-boys

这个编译的时候是需要ggml.cpp/h和util.cpp/h的,我们提供了cmakelist和makefile,可以尝试一下

chat.cpp里面用到了ggml_new_tensor_2d这个方法,但是在ggml.cpp和util.cpp里面却没有定义这个方法啊
model.tok_embeddings = ggml_new_tensor_2d(ctx, wtype, n_embd, n_vocab);
model.norm = ggml_new_tensor_1d(ctx, GGML_TYPE_F32, n_embd);
model.output = ggml_new_tensor_2d(ctx, wtype, n_embd, n_vocab);

from chinese-vicuna.

LZY-the-boys avatar LZY-the-boys commented on August 15, 2024

ggml.c 2630行有定义的

struct ggml_tensor * ggml_new_tensor_1d(
        struct ggml_context * ctx,
        enum   ggml_type type,
        int    ne0) {
    return ggml_new_tensor(ctx, type, 1, &ne0);
}
struct ggml_tensor * ggml_new_tensor_2d(
        struct ggml_context * ctx,
        enum   ggml_type type,
        int    ne0,
        int    ne1) {
    const int ne[2] = { ne0, ne1 };
    return ggml_new_tensor(ctx, type, 2, ne);
}

是不是拉取错代码了?

from chinese-vicuna.

yuxuan2015 avatar yuxuan2015 commented on August 15, 2024

@LZY-the-boys

ggml.c 2630行有定义的

struct ggml_tensor * ggml_new_tensor_1d(
        struct ggml_context * ctx,
        enum   ggml_type type,
        int    ne0) {
    return ggml_new_tensor(ctx, type, 1, &ne0);
}
struct ggml_tensor * ggml_new_tensor_2d(
        struct ggml_context * ctx,
        enum   ggml_type type,
        int    ne0,
        int    ne1) {
    const int ne[2] = { ne0, ne1 };
    return ggml_new_tensor(ctx, type, 2, ne);
}

是不是拉取错代码了?
解决了,代码没有拉错,用make -f Makefile.ref chat编译就成功了

from chinese-vicuna.

LZY-the-boys avatar LZY-the-boys commented on August 15, 2024

OK

from chinese-vicuna.

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.