Code Monkey home page Code Monkey logo

Comments (12)

fire avatar fire commented on May 24, 2024

cmake .. -GNinja -DCMAKE_OSX_ARCHITECTURES=x86_64 seemed to work.

from clip.cpp.

monatis avatar monatis commented on May 24, 2024

Ah yes, I need to update CMakeLists.txt to handle different arches. Launching Macbook

from clip.cpp.

fire avatar fire commented on May 24, 2024
./bin/quantize ../../CLIP-ViT-B-32-laion2B-s34B-b79K/ggml-model-f16.bin ggml-model-quantized.bin 3
# 3 is choosing better accuracy over inference times. 

from clip.cpp.

monatis avatar monatis commented on May 24, 2024

3 is choosing better accuracy over inference times.

yes, noteworthy in the quantization section.

from clip.cpp.

fire avatar fire commented on May 24, 2024
% ./bin/main --model ggml-model-quantized.bin --threads 12 --image ../../logo_dark.png --text eye
clip_model_load: loading model from 'ggml-model-quantized.bin' - please wait....................................................clip_model_load: model size =    93.92 MB / num tensors = 397
clip_model_load: model loadded

ggml_new_tensor_impl: not enough space in the context's memory pool (needed 12052448, available 8388608)
zsh: segmentation fault  ./bin/main --model ggml-model-quantized.bin --threads 12 --image  --text eye

Curious error.

% /usr/sbin/system_profiler SPHardwareDataType
Hardware:

    Hardware Overview:

      Model Name: Mac mini
      Model Identifier: Mac14,12
      Chip: Apple M2 Pro
      Total Number of Cores: 12 (8 performance and 4 efficiency)
      Memory: 32 GB
# some serials are omitted.

The contents of the build folder for when I switch to PC. https://docsend.com/view/7b9sacg2wcbu66kt

from clip.cpp.

monatis avatar monatis commented on May 24, 2024

couldn't reproduce it on Linux, will give it a try after updating CMakeLists.txt for Mac.

from clip.cpp.

fire avatar fire commented on May 24, 2024

I'm closing because I was able to test on Windows. But it's still unresolved, but I have no approaches.

from clip.cpp.

fire avatar fire commented on May 24, 2024

Use the other issue to track readme documentation.

from clip.cpp.

monatis avatar monatis commented on May 24, 2024

I couldn't reproduce it on my Macbook so couldn't help further, but I added a note at the end of the building section. So let's keep this open for now in case someone may want to help.

from clip.cpp.

Metal-joker avatar Metal-joker commented on May 24, 2024

Can not build successfully on m2 pro, could you help me out? I'm new to cpp. @monatis

mkdir build && cd build
cmake -DCLIP_NATIVE=ON ..
make

Error:

In file included from /clip.cpp/examples/common-clip.cpp:1:
/clip.cpp/examples/common-clip.h:13:46: error: a space is required between consecutive right angle brackets (use '> >')
std::map<std::string, std::vector<std::string>> get_dir_keyed_files(const std::string &path, uint32_t max_files_per_dir);


edit:
I may figure it out, I added below code in examples/CMakeLists.txt

target_compile_features(common-clip PUBLIC cxx_std_20)

Is it a bug or just local setting difference?

from clip.cpp.

monatis avatar monatis commented on May 24, 2024

Is it a bug or just local setting difference?

This error is raised when built with C++98 standards, and it shouldn't be an issue with C++11 and later. What compiler and version ar you using?

from clip.cpp.

Metal-joker avatar Metal-joker commented on May 24, 2024

Is it a bug or just local setting difference?

This error is raised when built with C++98 standards, and it shouldn't be an issue with C++11 and later. What compiler and version ar you using?

> c++ --version
Apple clang version 14.0.3 (clang-1403.0.22.14.1)
Target: arm64-apple-darwin22.4.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

from clip.cpp.

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.