{"id":53681,"date":"2023-09-10T11:49:42","date_gmt":"2023-09-10T09:49:42","guid":{"rendered":"https:\/\/www.burks.de\/burksblog\/?p=53681"},"modified":"2023-09-10T12:00:17","modified_gmt":"2023-09-10T10:00:17","slug":"llama","status":"publish","type":"post","link":"https:\/\/www.burks.de\/burksblog\/2023\/09\/10\/llama","title":{"rendered":"Llama"},"content":{"rendered":"<p><a href=\"https:\/\/www.burks.de\/burksblog\/pix\/2023\/09\/100923_1gr.jpg\"><img decoding=\"async\" src=\"https:\/\/www.burks.de\/burksblog\/pix\/2023\/09\/100923_1kl.jpg\" alt=\"maschinencode\" border=\"0\" hspace=\"0\" vspace=\"0\" width=\"480\"\/><\/a><\/p>\n<p>Kann mir mal jemand erk\u00e4ren, war ich machen muss, um dieses <a href=\"https:\/\/github.com\/facebookresearch\/llama\/blob\/main\/\">Llama<\/a> zu installieren? Ich kapier es nicht.<\/p>\n<p><code>#!\/usr\/bin\/env bash<\/p>\n<p># Copyright (c) Meta Platforms, Inc. and affiliates.<br \/>\n# This software may be used and distributed according to the terms of the Llama 2 Community License Agreement.<\/p>\n<p>set -e<\/p>\n<p>read -p \"Enter the URL from email: \" PRESIGNED_URL<br \/>\necho \"\"<br \/>\nread -p \"Enter the list of models to download without spaces (7B,13B,70B,7B-chat,13B-chat,70B-chat), or press Enter for all: \" MODEL_SIZE<br \/>\nTARGET_FOLDER=\".\"             # where all files should end up<br \/>\nmkdir -p ${TARGET_FOLDER}<\/p>\n<p>if [[ $MODEL_SIZE == \"\" ]]; then<br \/>\nMODEL_SIZE=\"7B,13B,70B,7B-chat,13B-chat,70B-chat\"<br \/>\nfi<\/p>\n<p>echo \"Downloading LICENSE and Acceptable Usage Policy\"<br \/>\nwget --continue ${PRESIGNED_URL\/'*'\/\"LICENSE\"} -O ${TARGET_FOLDER}\"\/LICENSE\"<br \/>\nwget --continue ${PRESIGNED_URL\/'*'\/\"USE_POLICY.md\"} -O ${TARGET_FOLDER}\"\/USE_POLICY.md\"<\/p>\n<p>echo \"Downloading tokenizer\"<br \/>\nwget --continue ${PRESIGNED_URL\/'*'\/\"tokenizer.model\"} -O ${TARGET_FOLDER}\"\/tokenizer.model\"<br \/>\nwget --continue ${PRESIGNED_URL\/'*'\/\"tokenizer_checklist.chk\"} -O ${TARGET_FOLDER}\"\/tokenizer_checklist.chk\"<br \/>\nCPU_ARCH=$(uname -m)<br \/>\nif [ \"$CPU_ARCH\" = \"arm64\" ]; then<br \/>\n(cd ${TARGET_FOLDER} && md5 tokenizer_checklist.chk)<br \/>\nelse<br \/>\n(cd ${TARGET_FOLDER} && md5sum -c tokenizer_checklist.chk)<br \/>\nfi<\/p>\n<p>for m in ${MODEL_SIZE\/\/,\/ }<br \/>\ndo<br \/>\nif [[ $m == \"7B\" ]]; then<br \/>\nSHARD=0<br \/>\nMODEL_PATH=\"llama-2-7b\"<br \/>\nelif [[ $m == \"7B-chat\" ]]; then<br \/>\nSHARD=0<br \/>\nMODEL_PATH=\"llama-2-7b-chat\"<br \/>\nelif [[ $m == \"13B\" ]]; then<br \/>\nSHARD=1<br \/>\nMODEL_PATH=\"llama-2-13b\"<br \/>\nelif [[ $m == \"13B-chat\" ]]; then<br \/>\nSHARD=1<br \/>\nMODEL_PATH=\"llama-2-13b-chat\"<br \/>\nelif [[ $m == \"70B\" ]]; then<br \/>\nSHARD=7<br \/>\nMODEL_PATH=\"llama-2-70b\"<br \/>\nelif [[ $m == \"70B-chat\" ]]; then<br \/>\nSHARD=7<br \/>\nMODEL_PATH=\"llama-2-70b-chat\"<br \/>\nfi<\/p>\n<p>echo \"Downloading ${MODEL_PATH}\"<br \/>\nmkdir -p ${TARGET_FOLDER}\"\/${MODEL_PATH}\"<\/p>\n<p>for s in $(seq -f \"0%g\" 0 ${SHARD})<br \/>\ndo<br \/>\nwget ${PRESIGNED_URL\/'*'\/\"${MODEL_PATH}\/consolidated.${s}.pth\"} -O ${TARGET_FOLDER}\"\/${MODEL_PATH}\/consolidated.${s}.pth\"<br \/>\ndone<\/p>\n<p>wget --continue ${PRESIGNED_URL\/'*'\/\"${MODEL_PATH}\/params.json\"} -O ${TARGET_FOLDER}\"\/${MODEL_PATH}\/params.json\"<br \/>\nwget --continue ${PRESIGNED_URL\/'*'\/\"${MODEL_PATH}\/checklist.chk\"} -O ${TARGET_FOLDER}\"\/${MODEL_PATH}\/checklist.chk\"<br \/>\necho \"Checking checksums\"<br \/>\nif [ \"$CPU_ARCH\" = \"arm64\" ]; then<br \/>\n(cd ${TARGET_FOLDER}\"\/${MODEL_PATH}\" && md5 checklist.chk)<br \/>\nelse<br \/>\n(cd ${TARGET_FOLDER}\"\/${MODEL_PATH}\" && md5sum -c checklist.chk)<br \/>\nfi<br \/>\ndone<\/code><\/p>\n<div class=\"pdfprnt-buttons pdfprnt-buttons-post pdfprnt-bottom-right\"><a href=\"https:\/\/www.burks.de\/burksblog\/wp-json\/wp\/v2\/posts\/53681?print=pdf\" class=\"pdfprnt-button pdfprnt-button-pdf\" target=\"_blank\" ><img decoding=\"async\" src=\"https:\/\/www.burks.de\/burksblog\/wp-content\/plugins\/pdf-print\/images\/pdf.png\" alt=\"image_pdf\" title=\"PDF anzeigen\" \/><\/a><a href=\"https:\/\/www.burks.de\/burksblog\/wp-json\/wp\/v2\/posts\/53681?print=print\" class=\"pdfprnt-button pdfprnt-button-print\" target=\"_blank\" ><img decoding=\"async\" src=\"https:\/\/www.burks.de\/burksblog\/wp-content\/plugins\/pdf-print\/images\/print.png\" alt=\"image_print\" title=\"Inhalt drucken\" \/><\/a><\/div><div class=\"twoclick_social_bookmarks_post_53681 social_share_privacy clearfix 1.6.4 locale-de_DE sprite-de_DE\"><\/div><div class=\"twoclick-js\"><script type=\"text\/javascript\">\/* <![CDATA[ *\/\njQuery(document).ready(function($){if($('.twoclick_social_bookmarks_post_53681')){$('.twoclick_social_bookmarks_post_53681').socialSharePrivacy({\"services\":{\"facebook\":{\"status\":\"on\",\"txt_info\":\"2 Klicks f\\u00fcr mehr Datenschutz: Erst wenn Sie hier klicken, wird der Button aktiv und Sie k\\u00f6nnen Ihre Empfehlung an Facebook senden. Schon beim Aktivieren werden Daten an Dritte \\u00fcbertragen - siehe <em>i<\\\/em>.\",\"perma_option\":\"off\",\"action\":\"recommend\",\"language\":\"de_DE\"},\"twitter\":{\"reply_to\":\"\",\"tweet_text\":\"Llama%20%C2%BB%20Burks%27%20Blog%20-%20in%20dubio%20pro%20contra.%20De%20omnibus%20dubitandum.\",\"status\":\"on\",\"txt_info\":\"2 Klicks f\\u00fcr mehr Datenschutz: Erst wenn Sie hier klicken, wird der Button aktiv und Sie k\\u00f6nnen Ihre Empfehlung an Twitter senden. Schon beim Aktivieren werden Daten an Dritte \\u00fcbertragen - siehe <em>i<\\\/em>.\",\"perma_option\":\"off\",\"language\":\"de\",\"referrer_track\":\"\"}},\"txt_help\":\"Wenn Sie diese Felder durch einen Klick aktivieren, werden Informationen an Facebook, Twitter, Flattr, Xing, t3n, LinkedIn, Pinterest oder Google eventuell ins Ausland \\u00fcbertragen und unter Umst\\u00e4nden auch dort gespeichert. N\\u00e4heres erfahren Sie durch einen Klick auf das <em>i<\\\/em>.\",\"settings_perma\":\"Dauerhaft aktivieren und Daten\\u00fcber-tragung zustimmen:\",\"info_link\":\"http:\\\/\\\/www.heise.de\\\/ct\\\/artikel\\\/2-Klicks-fuer-mehr-Datenschutz-1333879.html\",\"uri\":\"https:\\\/\\\/www.burks.de\\\/burksblog\\\/2023\\\/09\\\/10\\\/llama\",\"post_id\":53681,\"post_title_referrer_track\":\"Llama\",\"display_infobox\":\"on\"});}});\n\/* ]]> *\/<\/script><\/div>","protected":false},"excerpt":{"rendered":"<p>Kann mir mal jemand erk\u00e4ren, war ich machen muss, um dieses Llama zu installieren? Ich kapier es nicht. #!\/usr\/bin\/env bash # Copyright (c) Meta Platforms, Inc. and affiliates. # This software may be used and distributed according to the terms of the Llama 2 Community License Agreement. set -e read -p &#8222;Enter the URL from [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[21,616],"tags":[],"class_list":["post-53681","post","type-post","status-publish","format-standard","hentry","category-internet-and-computer","category-linux"],"_links":{"self":[{"href":"https:\/\/www.burks.de\/burksblog\/wp-json\/wp\/v2\/posts\/53681","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.burks.de\/burksblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.burks.de\/burksblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.burks.de\/burksblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.burks.de\/burksblog\/wp-json\/wp\/v2\/comments?post=53681"}],"version-history":[{"count":7,"href":"https:\/\/www.burks.de\/burksblog\/wp-json\/wp\/v2\/posts\/53681\/revisions"}],"predecessor-version":[{"id":53691,"href":"https:\/\/www.burks.de\/burksblog\/wp-json\/wp\/v2\/posts\/53681\/revisions\/53691"}],"wp:attachment":[{"href":"https:\/\/www.burks.de\/burksblog\/wp-json\/wp\/v2\/media?parent=53681"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.burks.de\/burksblog\/wp-json\/wp\/v2\/categories?post=53681"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.burks.de\/burksblog\/wp-json\/wp\/v2\/tags?post=53681"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}