staghado / vit.cpp Goto Github PK
View Code? Open in Web Editor NEWInference Vision Transformer (ViT) in plain C/C++ with ggml
License: MIT License
Inference Vision Transformer (ViT) in plain C/C++ with ggml
License: MIT License
did you miss the dependency nlohmann/json.hpp?
Hi @staghado thank you for publishing this amazing implementation of ViT using ggml.
I was thinking of doing a similar implementation for another transformer-based model by following your codebase. However, I could not find good documentation of ggml to know about existing functionalities and how to use them. Also, certain concepts (e.g., https://github.com/staghado/vit.cpp/blob/main/main.cpp#L82-L91) are not seen in a Python-based inference script.
Can you please share your approach when you implemented this ggml-based vit code? What were the resources that helped you to build this project? I appreciate any help you can provide.
Hey @staghado thanks for the great work!
I'm wondering whether you have any idea about implementing the batched images forward given batch size > 1.
I notice the batch processing in llama.cpp seems pretty different. No batch dim is involved in the forward pass. I also propose a [discussion]
(ggerganov/llama.cpp#4371) there. Do you have any idea about this? Thanks in advance!
Hi,
is it possible to use cuda for inference?
It would be nice if we can try this out on Android. I followed instructions from https://github.com/ggerganov/ggml
I tried it and seems that we need to remove -march=native
from CMakeLists.txt
-set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O3 -march=native")
-set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3 -march=native")
However, after that I got an error
CANNOT LINK EXECUTABLE "/data/local/tmp/bin/vit": cannot locate symbol "__emutls_get_address" referenced by "/data/local/tmp/bin/vit"...
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.