{"id":2591,"date":"2023-04-30T23:06:22","date_gmt":"2023-05-01T05:06:22","guid":{"rendered":"https:\/\/www.lastdragon.net\/?p=2591"},"modified":"2023-05-10T19:06:57","modified_gmt":"2023-05-11T01:06:57","slug":"pendiente-33","status":"publish","type":"post","link":"https:\/\/www.lastdragon.net\/?p=2591","title":{"rendered":"Instalar Dalai Llama modelo IA CHATBOT en Debian 11"},"content":{"rendered":"\n<p>En este articulo vamos a instalar el modelo de chatbot de Llama.<\/p>\n\n\n\n<p><strong>Requerimientos:<br \/><\/strong>Instalacion m\u00ednima de Debian 11<br \/>Python 3.10<br \/>NodeJS 18 o 19<\/p>\n\n\n\n<p><br \/><strong>Instalar herramientas de desarrollo<\/strong><\/p>\n\n\n\n<p>apt install build-essential zlib1g-dev libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libreadline-dev libffi-dev libsqlite3-dev wget libbz2-dev<\/p>\n\n\n\n<p><strong>Remover si esta instalado Python 3.9, Requerimos Python 3.10<\/strong><\/p>\n\n\n\n<p>apt remove python3.9 python3<br \/>apt autoremove<\/p>\n\n\n\n<p>Borrar archivos remanentes de existir<br \/>rm -rf \/usr\/bin\/python3.9 \/usr\/bin\/python3 \/usr\/lib\/python3.9 \/usr\/lib\/python3 \/etc\/python3.9 \/etc\/python3 \/usr\/local\/lib\/python3.9 \/usr\/share\/python3 \/usr\/share\/man\/man1\/python3.1.gz<\/p>\n\n\n\n<p><strong>Instalaci\u00f3n de Python<br \/><\/strong>Descargar c\u00f3digo fuente:<br \/>wget https:\/\/www.python.org\/ftp\/python\/3.10.0\/Python-3.10.0.tgz<\/p>\n\n\n\n<p>Compilar:<br \/>.\/configure &#8211;enable-optimizations<br \/>make<br \/>make altinstall<\/p>\n\n\n\n<p><strong>Instalar el repositorio de NodeJS en los source de APT:<br \/><\/strong>curl -fsSL https:\/\/deb.nodesource.com\/setup_19.x | bash<\/p>\n\n\n\n<p>apt update<br \/>apt install nodejs<\/p>\n\n\n\n<p><strong>Instalar el modelo Llama incluido Dalai con 7 Billones<br \/><\/strong><\/p>\n\n\n\n<p>npx dalai llama install 7B<\/p>\n\n\n\n<p>Tambien hay modelos 7B , 13B , 30B , 65B<\/p>\n\n\n\n<p><strong>Comandos para ejecutar el chatbot desde la consola<\/strong><\/p>\n\n\n\n<p><strong><br \/><\/strong>~\/dalai\/llama\/main -i &#8211;seed -1 &#8211;threads 6 &#8211;temp 0 -c 6144 -n -1 &#8211;ignore-eos &#8211;n_predict 600 &#8211;top_k 40 &#8211;top_p 0.9 &#8211;temp 0.8 &#8211;repeat_last_n 64 &#8211;repeat_penalty 1.2 &#8211;instruct -m (~) ggml-model-f16.bin<br \/>(~) Es la ruta al archivo ggml-model-f16.bin, debe encontrarse dentro del directorio dalai\/llama\/models\/7B<\/p>\n\n\n\n<p><strong>Arrancar el ChatBot en el WEB<br \/><\/strong>npx dalai serve<\/p>\n\n\n\n<p><strong>Video del articulo<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe loading=\"lazy\" title=\"Instalando un chatbot en nuestro Debian 11 con el modelo Llama 7B\" width=\"500\" height=\"281\" src=\"https:\/\/www.youtube.com\/embed\/bA1rx4_xmGc?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe>\n<\/div><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>En este articulo vamos a instalar el modelo de chatbot de Llama. Requerimientos:Instalacion m\u00ednima de Debian 11Python 3.10NodeJS 18 o 19 Instalar herramientas de desarrollo apt install build-essential zlib1g-dev libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libreadline-dev libffi-dev libsqlite3-dev wget libbz2-dev Remover si esta instalado Python 3.9, Requerimos Python 3.10 apt remove python3.9 python3apt autoremove Borrar archivos remanentes&#8230;<\/p>\n","protected":false},"author":1,"featured_media":2596,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"class_list":["post-2591","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-consultoria-y-manuales"],"_links":{"self":[{"href":"https:\/\/www.lastdragon.net\/index.php?rest_route=\/wp\/v2\/posts\/2591","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.lastdragon.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.lastdragon.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.lastdragon.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.lastdragon.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2591"}],"version-history":[{"count":4,"href":"https:\/\/www.lastdragon.net\/index.php?rest_route=\/wp\/v2\/posts\/2591\/revisions"}],"predecessor-version":[{"id":2597,"href":"https:\/\/www.lastdragon.net\/index.php?rest_route=\/wp\/v2\/posts\/2591\/revisions\/2597"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.lastdragon.net\/index.php?rest_route=\/wp\/v2\/media\/2596"}],"wp:attachment":[{"href":"https:\/\/www.lastdragon.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2591"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.lastdragon.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2591"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.lastdragon.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2591"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}