How to run native build?
dbezhetskov opened this issue · 1 comments
I've read docs (https://browser.mt/docs/main/marian-integration.html#example-command-line-run) and built app/bergamot (native c++ build) but still can't run any translation from CLI.
The main error is that I need to provide proper --model-config-paths
but I don't have any clue what that config file should look like.
In CI tests I also can't find usage of native cli bergamot.
Could anyone provide me with a working config file?
The following sequence should fetch a model for you to test things out when run from source-root being ${SRC}
:
mkdir ${SRC}/build
cd ${SRC}/build && cmake ..
make -j4 # Adjust parallel builds accordingly
# Built app should now be at ${SRC}/build/app/bergamot
# Fetch a model used in tests
cd ${SRC}/bergamot-translator-tests && make install
CONFIG="${SRC}/bergamot-translator-tests/models/deen/ende.student.tiny.for.regression.tests/config.intgemm8bitalpha.yml.bergamot.yml"
${SRC}/build/app/bergamot --model-config-paths $CONFIG --cpu-threads 4 <<< "Hello World!"
# Hallo Welt!
The above is checked on Ubuntu Linux and should work on a Mac as well. There are chances Windows has issues with path.
For a more user-friendly setting checkout translateLocally or the python CLI provided by lemonade.
I will leave this issue open until I can fix the documentation. Apologies for any inconvenience caused.