https://kotlinlang.org logo
#kotlindl
Title
# kotlindl
a

adambrangenberg

03/20/2024, 9:21 PM
I've been following that tutorial to get Gemma running in KotlinDL, however I'm unsure how to parse in the prompt. Could anyone help me with that? https://github.com/Kotlin/kotlindl/blob/master/docs/importing_keras_model.md
n

Nikita Ermolenko

03/21/2024, 1:56 PM
Currently, KotlinDL does not offer support for NLP/LLM functionalities. So, to continue with this task, you will need to use external libraries or tools for tokenization. I am not personally familiar with any pre-built solutions in Java/Kotlin, but you can explore some potential approaches from the following sources: • an external tokenizer for LLama2 as an external binary; refer to this link: https://github.com/mukel/llama2.java. • Another option involves using a tokenizer integrated into a custom ONNX operation, as this repository demonstrates: https://github.com/oracle/sd4j/tree/main.
👍 1
a

adambrangenberg

04/06/2024, 11:10 PM
I couldn't get llama working, sd4j is for image and not text generation if I saw correctly?
5 Views