CINXE.COM
HuggingFaceTB/SmolLM2-1.7B-Instruct · Hugging Face
<!doctype html> <html class=""> <head> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no" /> <meta name="description" content="We’re on a journey to advance and democratize artificial intelligence through open source and open science." /> <meta property="fb:app_id" content="1321688464574422" /> <meta name="twitter:card" content="summary_large_image" /> <meta name="twitter:site" content="@huggingface" /> <meta name="twitter:image" content="https://cdn-thumbnails.huggingface.co/social-thumbnails/models/HuggingFaceTB/SmolLM2-1.7B-Instruct.png" /> <meta property="og:title" content="HuggingFaceTB/SmolLM2-1.7B-Instruct · Hugging Face" /> <meta property="og:type" content="website" /> <meta property="og:url" content="https://huggingface.co/HuggingFaceTB/SmolLM2-1.7B-Instruct" /> <meta property="og:image" content="https://cdn-thumbnails.huggingface.co/social-thumbnails/models/HuggingFaceTB/SmolLM2-1.7B-Instruct.png" /> <link rel="stylesheet" href="/front/build/kube-8645c4d/style.css" /> <link rel="preconnect" href="https://fonts.gstatic.com" /> <link href="https://fonts.googleapis.com/css2?family=Source+Sans+Pro:ital,wght@0,200;0,300;0,400;0,600;0,700;0,900;1,200;1,300;1,400;1,600;1,700;1,900&display=swap" rel="stylesheet" /> <link href="https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;600;700&display=swap" rel="stylesheet" /> <link rel="preload" href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.12.0/katex.min.css" as="style" onload="this.onload=null;this.rel='stylesheet'" /> <noscript> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.12.0/katex.min.css" /> </noscript> <link rel="canonical" href="https://huggingface.co/HuggingFaceTB/SmolLM2-1.7B-Instruct"> <title>HuggingFaceTB/SmolLM2-1.7B-Instruct · Hugging Face</title> <script defer data-domain="huggingface.co" event-loggedIn="false" src="/js/script.pageview-props.js" ></script> <script> window.plausible = window.plausible || function () { (window.plausible.q = window.plausible.q || []).push(arguments); }; </script> <script> window.hubConfig = {"features":{"signupDisabled":false},"sshGitUrl":"git@hf.co","moonHttpUrl":"https:\/\/huggingface.co","captchaApiKey":"bd5f2066-93dc-4bdd-a64b-a24646ca3859","captchaDisabledOnSignup":false,"datasetViewerPublicUrl":"https:\/\/datasets-server.huggingface.co","stripePublicKey":"pk_live_x2tdjFXBCvXo2FFmMybezpeM00J6gPCAAc","environment":"production","userAgent":"HuggingFace (production)","spacesIframeDomain":"hf.space","spacesApiUrl":"https:\/\/api.hf.space","docSearchKey":"ece5e02e57300e17d152c08056145326e90c4bff3dd07d7d1ae40cf1c8d39cb6","logoDev":{"apiUrl":"https:\/\/img.logo.dev\/","apiKey":"pk_UHS2HZOeRnaSOdDp7jbd5w"}}; </script> <script type="text/javascript" src="https://de5282c3ca0c.edge.sdk.awswaf.com/de5282c3ca0c/526cf06acb0d/challenge.js" defer></script> </head> <body class="flex flex-col min-h-dvh bg-white dark:bg-gray-950 text-black ModelPage"> <div class="flex min-h-dvh flex-col"> <div class="SVELTE_HYDRATER contents" data-target="MainHeader" data-props="{"classNames":"","isWide":false,"isZh":false}"><header class="border-b border-gray-100 "><div class="w-full px-4 container flex h-16 items-center"><div class="flex flex-1 items-center"><a class="mr-5 flex flex-none items-center lg:mr-6" href="/"><img alt="Hugging Face's logo" class="w-7 md:mr-2" src="/front/assets/huggingface_logo-noborder.svg"> <span class="hidden whitespace-nowrap text-lg font-bold md:block">Hugging Face</span></a> <div class="relative flex-1 lg:max-w-sm mr-2 sm:mr-4 md:mr-3 xl:mr-6"><input autocomplete="off" class="w-full dark:bg-gray-950 pl-8 form-input-alt h-9 pr-3 focus:shadow-xl " name="" placeholder="Search models, datasets, users..." spellcheck="false" type="text" value=""> <svg class="absolute left-2.5 text-gray-400 top-1/2 transform -translate-y-1/2" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M30 28.59L22.45 21A11 11 0 1 0 21 22.45L28.59 30zM5 14a9 9 0 1 1 9 9a9 9 0 0 1-9-9z" fill="currentColor"></path></svg> </div> <div class="flex flex-none items-center justify-center p-0.5 place-self-stretch lg:hidden"><button class="relative z-40 flex h-6 w-8 items-center justify-center" type="button"><svg width="1em" height="1em" viewBox="0 0 10 10" class="text-xl" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" focusable="false" role="img" preserveAspectRatio="xMidYMid meet" fill="currentColor"><path fill-rule="evenodd" clip-rule="evenodd" d="M1.65039 2.9999C1.65039 2.8066 1.80709 2.6499 2.00039 2.6499H8.00039C8.19369 2.6499 8.35039 2.8066 8.35039 2.9999C8.35039 3.1932 8.19369 3.3499 8.00039 3.3499H2.00039C1.80709 3.3499 1.65039 3.1932 1.65039 2.9999ZM1.65039 4.9999C1.65039 4.8066 1.80709 4.6499 2.00039 4.6499H8.00039C8.19369 4.6499 8.35039 4.8066 8.35039 4.9999C8.35039 5.1932 8.19369 5.3499 8.00039 5.3499H2.00039C1.80709 5.3499 1.65039 5.1932 1.65039 4.9999ZM2.00039 6.6499C1.80709 6.6499 1.65039 6.8066 1.65039 6.9999C1.65039 7.1932 1.80709 7.3499 2.00039 7.3499H8.00039C8.19369 7.3499 8.35039 7.1932 8.35039 6.9999C8.35039 6.8066 8.19369 6.6499 8.00039 6.6499H2.00039Z"></path></svg> </button> </div></div> <nav aria-label="Main" class="ml-auto hidden lg:block"><ul class="flex items-center space-x-1.5 2xl:space-x-2"><li class="hover:text-indigo-700"><a class="group flex items-center px-2 py-0.5 dark:hover:text-gray-400" href="/models"><svg class="mr-1.5 text-gray-400 group-hover:text-indigo-500" style="" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 24 24"><path class="uim-quaternary" d="M20.23 7.24L12 12L3.77 7.24a1.98 1.98 0 0 1 .7-.71L11 2.76c.62-.35 1.38-.35 2 0l6.53 3.77c.29.173.531.418.7.71z" opacity=".25" fill="currentColor"></path><path class="uim-tertiary" d="M12 12v9.5a2.09 2.09 0 0 1-.91-.21L4.5 17.48a2.003 2.003 0 0 1-1-1.73v-7.5a2.06 2.06 0 0 1 .27-1.01L12 12z" opacity=".5" fill="currentColor"></path><path class="uim-primary" d="M20.5 8.25v7.5a2.003 2.003 0 0 1-1 1.73l-6.62 3.82c-.275.13-.576.198-.88.2V12l8.23-4.76c.175.308.268.656.27 1.01z" fill="currentColor"></path></svg> Models</a> </li><li class="hover:text-red-700"><a class="group flex items-center px-2 py-0.5 dark:hover:text-gray-400" href="/datasets"><svg class="mr-1.5 text-gray-400 group-hover:text-red-500" style="" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 25 25"><ellipse cx="12.5" cy="5" fill="currentColor" fill-opacity="0.25" rx="7.5" ry="2"></ellipse><path d="M12.5 15C16.6421 15 20 14.1046 20 13V20C20 21.1046 16.6421 22 12.5 22C8.35786 22 5 21.1046 5 20V13C5 14.1046 8.35786 15 12.5 15Z" fill="currentColor" opacity="0.5"></path><path d="M12.5 7C16.6421 7 20 6.10457 20 5V11.5C20 12.6046 16.6421 13.5 12.5 13.5C8.35786 13.5 5 12.6046 5 11.5V5C5 6.10457 8.35786 7 12.5 7Z" fill="currentColor" opacity="0.5"></path><path d="M5.23628 12C5.08204 12.1598 5 12.8273 5 13C5 14.1046 8.35786 15 12.5 15C16.6421 15 20 14.1046 20 13C20 12.8273 19.918 12.1598 19.7637 12C18.9311 12.8626 15.9947 13.5 12.5 13.5C9.0053 13.5 6.06886 12.8626 5.23628 12Z" fill="currentColor"></path></svg> Datasets</a> </li><li class="hover:text-blue-700"><a class="group flex items-center px-2 py-0.5 dark:hover:text-gray-400" href="/spaces"><svg class="mr-1.5 text-gray-400 group-hover:text-blue-500" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" focusable="false" role="img" width="1em" height="1em" viewBox="0 0 25 25"><path opacity=".5" d="M6.016 14.674v4.31h4.31v-4.31h-4.31ZM14.674 14.674v4.31h4.31v-4.31h-4.31ZM6.016 6.016v4.31h4.31v-4.31h-4.31Z" fill="currentColor"></path><path opacity=".75" fill-rule="evenodd" clip-rule="evenodd" d="M3 4.914C3 3.857 3.857 3 4.914 3h6.514c.884 0 1.628.6 1.848 1.414a5.171 5.171 0 0 1 7.31 7.31c.815.22 1.414.964 1.414 1.848v6.514A1.914 1.914 0 0 1 20.086 22H4.914A1.914 1.914 0 0 1 3 20.086V4.914Zm3.016 1.102v4.31h4.31v-4.31h-4.31Zm0 12.968v-4.31h4.31v4.31h-4.31Zm8.658 0v-4.31h4.31v4.31h-4.31Zm0-10.813a2.155 2.155 0 1 1 4.31 0 2.155 2.155 0 0 1-4.31 0Z" fill="currentColor"></path><path opacity=".25" d="M16.829 6.016a2.155 2.155 0 1 0 0 4.31 2.155 2.155 0 0 0 0-4.31Z" fill="currentColor"></path></svg> Spaces</a> </li><li class="hover:text-yellow-700 max-xl:hidden"><a class="group flex items-center px-2 py-0.5 dark:hover:text-gray-400" href="/posts"><svg class="mr-1.5 text-gray-400 group-hover:text-yellow-500 !text-yellow-500" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" focusable="false" role="img" width="1em" height="1em" viewBox="0 0 12 12" preserveAspectRatio="xMidYMid meet"><path fill="currentColor" fill-rule="evenodd" d="M3.73 2.4A4.25 4.25 0 1 1 6 10.26H2.17l-.13-.02a.43.43 0 0 1-.3-.43l.01-.06a.43.43 0 0 1 .12-.22l.84-.84A4.26 4.26 0 0 1 3.73 2.4Z" clip-rule="evenodd"></path></svg> Posts</a> </li><li class="hover:text-yellow-700"><a class="group flex items-center px-2 py-0.5 dark:hover:text-gray-400" href="/docs"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="mr-1.5 text-gray-400 group-hover:text-yellow-500" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path opacity="0.5" d="M20.9022 5.10334L10.8012 10.8791L7.76318 9.11193C8.07741 8.56791 8.5256 8.11332 9.06512 7.7914L15.9336 3.73907C17.0868 3.08811 18.5002 3.26422 19.6534 3.91519L19.3859 3.73911C19.9253 4.06087 20.5879 4.56025 20.9022 5.10334Z" fill="currentColor"></path><path d="M10.7999 10.8792V28.5483C10.2136 28.5475 9.63494 28.4139 9.10745 28.1578C8.5429 27.8312 8.074 27.3621 7.74761 26.7975C7.42122 26.2327 7.24878 25.5923 7.24756 24.9402V10.9908C7.25062 10.3319 7.42358 9.68487 7.74973 9.1123L10.7999 10.8792Z" fill="currentColor" fill-opacity="0.75"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M21.3368 10.8499V6.918C21.3331 6.25959 21.16 5.61234 20.8346 5.03949L10.7971 10.8727L10.8046 10.874L21.3368 10.8499Z" fill="currentColor"></path><path opacity="0.5" d="M21.7937 10.8488L10.7825 10.8741V28.5486L21.7937 28.5234C23.3344 28.5234 24.5835 27.2743 24.5835 25.7335V13.6387C24.5835 12.0979 23.4365 11.1233 21.7937 10.8488Z" fill="currentColor"></path></svg> Docs</a> </li><li class="hover:text-green-700"><a class="group flex items-center px-2 py-0.5 dark:hover:text-gray-400" href="/enterprise"><svg class="mr-1.5 text-gray-400 group-hover:text-green-500" xmlns="http://www.w3.org/2000/svg" fill="none" aria-hidden="true" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 33 27"><path fill="currentColor" fill-rule="evenodd" d="M13.5.7a8.7 8.7 0 0 0-7.7 5.7L1 20.6c-1 3.1.9 5.7 4.1 5.7h15c3.3 0 6.8-2.6 7.8-5.7l4.6-14.2c1-3.1-.8-5.7-4-5.7h-15Zm1.1 5.7L9.8 20.3h9.8l1-3.1h-5.8l.8-2.5h4.8l1.1-3h-4.8l.8-2.3H23l1-3h-9.5Z" clip-rule="evenodd"></path></svg> Enterprise</a> </li> <li><a class="group flex items-center px-2 py-0.5 hover:text-gray-500 dark:hover:text-gray-400" href="/pricing">Pricing </a></li> <li><div class="relative group"> <button class="px-2 py-0.5 hover:text-gray-500 dark:hover:text-gray-600 flex items-center " type="button"> <svg class=" text-gray-500 w-5 group-hover:text-gray-400 dark:text-gray-300 dark:group-hover:text-gray-400" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" focusable="false" role="img" width="1em" height="1em" viewBox="0 0 32 18" preserveAspectRatio="xMidYMid meet"><path fill-rule="evenodd" clip-rule="evenodd" d="M14.4504 3.30221C14.4504 2.836 14.8284 2.45807 15.2946 2.45807H28.4933C28.9595 2.45807 29.3374 2.836 29.3374 3.30221C29.3374 3.76842 28.9595 4.14635 28.4933 4.14635H15.2946C14.8284 4.14635 14.4504 3.76842 14.4504 3.30221Z" fill="currentColor"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M14.4504 9.00002C14.4504 8.53382 14.8284 8.15588 15.2946 8.15588H28.4933C28.9595 8.15588 29.3374 8.53382 29.3374 9.00002C29.3374 9.46623 28.9595 9.84417 28.4933 9.84417H15.2946C14.8284 9.84417 14.4504 9.46623 14.4504 9.00002Z" fill="currentColor"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M14.4504 14.6978C14.4504 14.2316 14.8284 13.8537 15.2946 13.8537H28.4933C28.9595 13.8537 29.3374 14.2316 29.3374 14.6978C29.3374 15.164 28.9595 15.542 28.4933 15.542H15.2946C14.8284 15.542 14.4504 15.164 14.4504 14.6978Z" fill="currentColor"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M1.94549 6.87377C2.27514 6.54411 2.80962 6.54411 3.13928 6.87377L6.23458 9.96907L9.32988 6.87377C9.65954 6.54411 10.194 6.54411 10.5237 6.87377C10.8533 7.20343 10.8533 7.73791 10.5237 8.06756L6.23458 12.3567L1.94549 8.06756C1.61583 7.73791 1.61583 7.20343 1.94549 6.87377Z" fill="currentColor"></path></svg> </button> </div></li> <li><hr class="h-5 w-0.5 border-none bg-gray-100 dark:bg-gray-800"></li> <li><a class="block cursor-pointer whitespace-nowrap px-2 py-0.5 hover:text-gray-500 dark:hover:text-gray-400" href="/login">Log In </a></li> <li><a class="whitespace-nowrap rounded-full border border-transparent bg-gray-900 px-3 py-1 leading-none text-white hover:border-black hover:bg-white hover:text-black" href="/join">Sign Up </a></li></ul></nav></div></header></div> <div class="SVELTE_HYDRATER contents" data-target="SSOBanner" data-props="{}"></div> <main class="flex flex-1 flex-col"> <div class="SVELTE_HYDRATER contents" data-target="ModelHeader" data-props="{"activeTab":"modelCard","author":{"avatarUrl":"https://cdn-avatars.huggingface.co/v1/production/uploads/651e96991b97c9f33d26bde6/e4VK7uW5sTeCYupD0s_ob.png","fullname":"Hugging Face TB Research","name":"HuggingFaceTB","type":"org","isHf":false,"isMod":false,"isEnterprise":true,"followerCount":515},"canReadRepoSettings":false,"canWriteRepoContent":false,"canDisable":false,"hasGatedAccess":true,"model":{"author":"HuggingFaceTB","cardData":{"library_name":"transformers","license":"apache-2.0","language":["en"],"pipeline_tag":"text-generation","tags":["safetensors","onnx","transformers.js"],"base_model":["HuggingFaceTB/SmolLM2-1.7B"]},"cardExists":true,"config":{"architectures":["LlamaForCausalLM"],"model_type":"llama","tokenizer_config":{"bos_token":"<|im_start|>","chat_template":"{% for message in messages %}{% if loop.first and messages[0]['role'] != 'system' %}{{ '<|im_start|>system\nYou are a helpful AI assistant named SmolLM, trained by Hugging Face<|im_end|>\n' }}{% endif %}{{'<|im_start|>' + message['role'] + '\n' + message['content'] + '<|im_end|>' + '\n'}}{% endfor %}{% if add_generation_prompt %}{{ '<|im_start|>assistant\n' }}{% endif %}","eos_token":"<|im_end|>","pad_token":"<|im_end|>","unk_token":"<|endoftext|>"}},"createdAt":"2024-10-31T13:42:06.000Z","discussionsDisabled":false,"downloads":82250,"downloadsAllTime":82250,"id":"HuggingFaceTB/SmolLM2-1.7B-Instruct","isLikedByUser":false,"inference":"cold","lastModified":"2024-11-26T16:00:38.000Z","likes":381,"pipeline_tag":"text-generation","library_name":"transformers","librariesOther":["transformers.js"],"trackDownloads":true,"model-index":null,"private":false,"repoType":"model","gated":false,"pwcLink":{"error":"Unknown error, can't generate link to Papers With Code."},"tags":["transformers","tensorboard","onnx","safetensors","llama","text-generation","transformers.js","conversational","en","base_model:HuggingFaceTB/SmolLM2-1.7B","base_model:quantized:HuggingFaceTB/SmolLM2-1.7B","license:apache-2.0","autotrain_compatible","text-generation-inference","endpoints_compatible","region:us"],"tag_objs":[{"id":"text-generation","label":"Text Generation","type":"pipeline_tag","subType":"nlp"},{"id":"transformers","label":"Transformers","type":"library"},{"id":"tensorboard","label":"TensorBoard","type":"library"},{"id":"onnx","label":"ONNX","type":"library"},{"id":"safetensors","label":"Safetensors","type":"library"},{"id":"transformers.js","label":"Transformers.js","type":"library"},{"id":"en","label":"English","type":"language"},{"id":"llama","label":"llama","type":"other"},{"id":"conversational","label":"conversational","type":"other"},{"id":"base_model:HuggingFaceTB/SmolLM2-1.7B","label":"base_model:HuggingFaceTB/SmolLM2-1.7B","type":"other"},{"id":"base_model:quantized:HuggingFaceTB/SmolLM2-1.7B","label":"base_model:quantized:HuggingFaceTB/SmolLM2-1.7B","type":"other"},{"id":"autotrain_compatible","label":"AutoTrain Compatible","type":"other"},{"id":"text-generation-inference","label":"text-generation-inference","type":"other"},{"id":"endpoints_compatible","label":"Inference Endpoints","type":"other"},{"id":"license:apache-2.0","label":"apache-2.0","type":"license"},{"type":"region","label":"🇺🇸 Region: US","id":"region:us"}],"transformersInfo":{"auto_model":"AutoModelForCausalLM","pipeline_tag":"text-generation","processor":"AutoTokenizer"},"widgetData":[{"text":"Hey my name is Julien! How are you?"},{"text":"Hey my name is Thomas! How are you?"},{"text":"Hey my name is Mariama! How are you?"},{"text":"Hey my name is Clara! How are you?"},{"text":"Hey my name is Julien! How are you?"},{"text":"Hi."}],"safetensors":{"parameters":{"BF16":1711376384},"total":1711376384,"sharded":false},"hasBlockedOids":false},"discussionsStats":{"closed":13,"open":5,"total":18},"query":{}}"><header class="from-gray-50-to-white border-b border-gray-100 bg-gradient-to-t via-white dark:via-gray-950 pt-6 sm:pt-9"><div class="container relative "><h1 class="flex flex-wrap items-center leading-tight mb-3 text-lg max-sm:gap-y-1.5 md:text-xl"> <div class="group flex flex-none items-center"><div class="relative mr-1 flex items-center"> <img alt="" class="w-3.5 h-3.5 rounded flex-none" src="https://cdn-avatars.huggingface.co/v1/production/uploads/651e96991b97c9f33d26bde6/e4VK7uW5sTeCYupD0s_ob.png" crossorigin="anonymous"></div> <a href="/HuggingFaceTB" class="text-gray-400 hover:text-blue-600">HuggingFaceTB</a> <div class="mx-0.5 text-gray-300">/</div></div> <div class="max-w-full "><a class="break-words font-mono font-semibold hover:text-blue-600 " href="/HuggingFaceTB/SmolLM2-1.7B-Instruct">SmolLM2-1.7B-Instruct</a> <button class="relative text-sm mr-4 inline-flex cursor-pointer items-center text-sm focus:outline-none mx-0.5 text-gray-600 " title="Copy model name to clipboard" type="button"><svg class="" xmlns="http://www.w3.org/2000/svg" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M28,10V28H10V10H28m0-2H10a2,2,0,0,0-2,2V28a2,2,0,0,0,2,2H28a2,2,0,0,0,2-2V10a2,2,0,0,0-2-2Z" transform="translate(0)"></path><path d="M4,18H2V4A2,2,0,0,1,4,2H18V4H4Z" transform="translate(0)"></path><rect fill="none" width="32" height="32"></rect></svg> </button></div> <div class="inline-flex items-center overflow-hidden whitespace-nowrap rounded-md border bg-white text-sm leading-none text-gray-500 mr-2"><button class="relative flex items-center overflow-hidden from-red-50 to-transparent dark:from-red-900 px-1.5 py-1 hover:bg-gradient-to-t focus:outline-none" title="Like"><svg class="left-1.5 absolute" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32" fill="currentColor"><path d="M22.45,6a5.47,5.47,0,0,1,3.91,1.64,5.7,5.7,0,0,1,0,8L16,26.13,5.64,15.64a5.7,5.7,0,0,1,0-8,5.48,5.48,0,0,1,7.82,0L16,10.24l2.53-2.58A5.44,5.44,0,0,1,22.45,6m0-2a7.47,7.47,0,0,0-5.34,2.24L16,7.36,14.89,6.24a7.49,7.49,0,0,0-10.68,0,7.72,7.72,0,0,0,0,10.82L16,29,27.79,17.06a7.72,7.72,0,0,0,0-10.82A7.49,7.49,0,0,0,22.45,4Z"></path></svg> <span class="ml-4 pl-0.5 ">like</span></button> <button class="flex items-center border-l px-1.5 py-1 text-gray-400 hover:bg-gray-50 focus:bg-gray-100 focus:outline-none dark:hover:bg-gray-900 dark:focus:bg-gray-800" title="See users who liked this repository">381</button></div> <div class="relative flex items-center gap-1.5 "><div class="mr-2 inline-flex h-6 items-center overflow-hidden whitespace-nowrap rounded-md border text-sm text-gray-500"><button class="relative flex h-full max-w-56 items-center gap-1.5 overflow-hidden px-1.5 hover:bg-gray-50 focus:bg-gray-100 focus:outline-none dark:hover:bg-gray-900 dark:focus:bg-gray-800" type="button" ><div class="flex h-full flex-1 items-center justify-center ">Follow</div> <img alt="" class="size-3 flex-none rounded-sm" src="https://cdn-avatars.huggingface.co/v1/production/uploads/651e96991b97c9f33d26bde6/e4VK7uW5sTeCYupD0s_ob.png"> <span class="truncate">Hugging Face TB Research</span></button> <button class="flex h-full items-center border-l pl-1.5 pr-1.5 text-gray-400 hover:bg-gray-50 focus:bg-gray-100 focus:outline-none dark:hover:bg-gray-900 dark:focus:bg-gray-800" title="Show Hugging Face TB Research's followers" type="button">515</button></div> </div> </h1> <div class="mb-3 flex flex-wrap md:mb-4"><a class="mb-1 mr-1 md:mb-1.5 md:mr-1.5 rounded-lg" href="/models?pipeline_tag=text-generation"><div class="tag tag-white "><div class="tag-ico -ml-2 tag-ico-indigo"><svg class="" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 18 18"><path d="M16.2607 8.08202L14.468 6.28928C14.3063 6.12804 14.0873 6.03749 13.859 6.03749C13.6307 6.03749 13.4117 6.12804 13.25 6.28928L5.6375 13.904V16.9125H8.64607L16.2607 9.30002C16.422 9.13836 16.5125 8.91935 16.5125 8.69102C16.5125 8.4627 16.422 8.24369 16.2607 8.08202V8.08202ZM8.1953 15.825H6.725V14.3547L11.858 9.22118L13.3288 10.6915L8.1953 15.825ZM14.0982 9.92262L12.6279 8.45232L13.8606 7.21964L15.3309 8.68994L14.0982 9.92262Z"></path><path d="M6.18125 9.84373H7.26875V6.03748H8.9V4.94998H4.55V6.03748H6.18125V9.84373Z"></path><path d="M4.55 11.475H2.375V2.775H11.075V4.95H12.1625V2.775C12.1625 2.48658 12.0479 2.20997 11.844 2.00602C11.64 1.80208 11.3634 1.6875 11.075 1.6875H2.375C2.08658 1.6875 1.80997 1.80208 1.60602 2.00602C1.40207 2.20997 1.2875 2.48658 1.2875 2.775V11.475C1.2875 11.7634 1.40207 12.04 1.60602 12.244C1.80997 12.4479 2.08658 12.5625 2.375 12.5625H4.55V11.475Z"></path></svg></div> <span>Text Generation</span> </div></a><a class="mb-1 mr-1 md:mb-1.5 md:mr-1.5 rounded-lg" href="/models?library=transformers"><div class="tag tag-white "><svg class="text-black inline-block text-sm" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" focusable="false" role="img" preserveAspectRatio="xMidYMid meet" width="1em" height="1em" viewBox="0 0 95 88"><path fill="#fff" d="M94.25 70.08a8.28 8.28 0 0 1-.43 6.46 10.57 10.57 0 0 1-3 3.6 25.18 25.18 0 0 1-5.7 3.2 65.74 65.74 0 0 1-7.56 2.65 46.67 46.67 0 0 1-11.42 1.68c-5.42.05-10.09-1.23-13.4-4.5a40.4 40.4 0 0 1-10.14.03c-3.34 3.25-7.99 4.52-13.39 4.47a46.82 46.82 0 0 1-11.43-1.68 66.37 66.37 0 0 1-7.55-2.65c-2.28-.98-4.17-2-5.68-3.2a10.5 10.5 0 0 1-3.02-3.6c-.99-2-1.18-4.3-.42-6.46a8.54 8.54 0 0 1-.33-5.63c.25-.95.66-1.83 1.18-2.61a8.67 8.67 0 0 1 2.1-8.47 8.23 8.23 0 0 1 2.82-2.07 41.75 41.75 0 1 1 81.3-.12 8.27 8.27 0 0 1 3.11 2.19 8.7 8.7 0 0 1 2.1 8.47c.52.78.93 1.66 1.18 2.61a8.61 8.61 0 0 1-.32 5.63Z"></path><path fill="#FFD21E" d="M47.21 76.5a34.75 34.75 0 1 0 0-69.5 34.75 34.75 0 0 0 0 69.5Z"></path><path fill="#FF9D0B" d="M81.96 41.75a34.75 34.75 0 1 0-69.5 0 34.75 34.75 0 0 0 69.5 0Zm-73.5 0a38.75 38.75 0 1 1 77.5 0 38.75 38.75 0 0 1-77.5 0Z"></path><path fill="#3A3B45" d="M58.5 32.3c1.28.44 1.78 3.06 3.07 2.38a5 5 0 1 0-6.76-2.07c.61 1.15 2.55-.72 3.7-.32ZM34.95 32.3c-1.28.44-1.79 3.06-3.07 2.38a5 5 0 1 1 6.76-2.07c-.61 1.15-2.56-.72-3.7-.32Z"></path><path fill="#FF323D" d="M46.96 56.29c9.83 0 13-8.76 13-13.26 0-2.34-1.57-1.6-4.09-.36-2.33 1.15-5.46 2.74-8.9 2.74-7.19 0-13-6.88-13-2.38s3.16 13.26 13 13.26Z"></path><path fill="#3A3B45" fill-rule="evenodd" d="M39.43 54a8.7 8.7 0 0 1 5.3-4.49c.4-.12.81.57 1.24 1.28.4.68.82 1.37 1.24 1.37.45 0 .9-.68 1.33-1.35.45-.7.89-1.38 1.32-1.25a8.61 8.61 0 0 1 5 4.17c3.73-2.94 5.1-7.74 5.1-10.7 0-2.34-1.57-1.6-4.09-.36l-.14.07c-2.31 1.15-5.39 2.67-8.77 2.67s-6.45-1.52-8.77-2.67c-2.6-1.29-4.23-2.1-4.23.29 0 3.05 1.46 8.06 5.47 10.97Z" clip-rule="evenodd"></path><path fill="#FF9D0B" d="M70.71 37a3.25 3.25 0 1 0 0-6.5 3.25 3.25 0 0 0 0 6.5ZM24.21 37a3.25 3.25 0 1 0 0-6.5 3.25 3.25 0 0 0 0 6.5ZM17.52 48c-1.62 0-3.06.66-4.07 1.87a5.97 5.97 0 0 0-1.33 3.76 7.1 7.1 0 0 0-1.94-.3c-1.55 0-2.95.59-3.94 1.66a5.8 5.8 0 0 0-.8 7 5.3 5.3 0 0 0-1.79 2.82c-.24.9-.48 2.8.8 4.74a5.22 5.22 0 0 0-.37 5.02c1.02 2.32 3.57 4.14 8.52 6.1 3.07 1.22 5.89 2 5.91 2.01a44.33 44.33 0 0 0 10.93 1.6c5.86 0 10.05-1.8 12.46-5.34 3.88-5.69 3.33-10.9-1.7-15.92-2.77-2.78-4.62-6.87-5-7.77-.78-2.66-2.84-5.62-6.25-5.62a5.7 5.7 0 0 0-4.6 2.46c-1-1.26-1.98-2.25-2.86-2.82A7.4 7.4 0 0 0 17.52 48Zm0 4c.51 0 1.14.22 1.82.65 2.14 1.36 6.25 8.43 7.76 11.18.5.92 1.37 1.31 2.14 1.31 1.55 0 2.75-1.53.15-3.48-3.92-2.93-2.55-7.72-.68-8.01.08-.02.17-.02.24-.02 1.7 0 2.45 2.93 2.45 2.93s2.2 5.52 5.98 9.3c3.77 3.77 3.97 6.8 1.22 10.83-1.88 2.75-5.47 3.58-9.16 3.58-3.81 0-7.73-.9-9.92-1.46-.11-.03-13.45-3.8-11.76-7 .28-.54.75-.76 1.34-.76 2.38 0 6.7 3.54 8.57 3.54.41 0 .7-.17.83-.6.79-2.85-12.06-4.05-10.98-8.17.2-.73.71-1.02 1.44-1.02 3.14 0 10.2 5.53 11.68 5.53.11 0 .2-.03.24-.1.74-1.2.33-2.04-4.9-5.2-5.21-3.16-8.88-5.06-6.8-7.33.24-.26.58-.38 1-.38 3.17 0 10.66 6.82 10.66 6.82s2.02 2.1 3.25 2.1c.28 0 .52-.1.68-.38.86-1.46-8.06-8.22-8.56-11.01-.34-1.9.24-2.85 1.31-2.85Z"></path><path fill="#FFD21E" d="M38.6 76.69c2.75-4.04 2.55-7.07-1.22-10.84-3.78-3.77-5.98-9.3-5.98-9.3s-.82-3.2-2.69-2.9c-1.87.3-3.24 5.08.68 8.01 3.91 2.93-.78 4.92-2.29 2.17-1.5-2.75-5.62-9.82-7.76-11.18-2.13-1.35-3.63-.6-3.13 2.2.5 2.79 9.43 9.55 8.56 11-.87 1.47-3.93-1.71-3.93-1.71s-9.57-8.71-11.66-6.44c-2.08 2.27 1.59 4.17 6.8 7.33 5.23 3.16 5.64 4 4.9 5.2-.75 1.2-12.28-8.53-13.36-4.4-1.08 4.11 11.77 5.3 10.98 8.15-.8 2.85-9.06-5.38-10.74-2.18-1.7 3.21 11.65 6.98 11.76 7.01 4.3 1.12 15.25 3.49 19.08-2.12Z"></path><path fill="#FF9D0B" d="M77.4 48c1.62 0 3.07.66 4.07 1.87a5.97 5.97 0 0 1 1.33 3.76 7.1 7.1 0 0 1 1.95-.3c1.55 0 2.95.59 3.94 1.66a5.8 5.8 0 0 1 .8 7 5.3 5.3 0 0 1 1.78 2.82c.24.9.48 2.8-.8 4.74a5.22 5.22 0 0 1 .37 5.02c-1.02 2.32-3.57 4.14-8.51 6.1-3.08 1.22-5.9 2-5.92 2.01a44.33 44.33 0 0 1-10.93 1.6c-5.86 0-10.05-1.8-12.46-5.34-3.88-5.69-3.33-10.9 1.7-15.92 2.78-2.78 4.63-6.87 5.01-7.77.78-2.66 2.83-5.62 6.24-5.62a5.7 5.7 0 0 1 4.6 2.46c1-1.26 1.98-2.25 2.87-2.82A7.4 7.4 0 0 1 77.4 48Zm0 4c-.51 0-1.13.22-1.82.65-2.13 1.36-6.25 8.43-7.76 11.18a2.43 2.43 0 0 1-2.14 1.31c-1.54 0-2.75-1.53-.14-3.48 3.91-2.93 2.54-7.72.67-8.01a1.54 1.54 0 0 0-.24-.02c-1.7 0-2.45 2.93-2.45 2.93s-2.2 5.52-5.97 9.3c-3.78 3.77-3.98 6.8-1.22 10.83 1.87 2.75 5.47 3.58 9.15 3.58 3.82 0 7.73-.9 9.93-1.46.1-.03 13.45-3.8 11.76-7-.29-.54-.75-.76-1.34-.76-2.38 0-6.71 3.54-8.57 3.54-.42 0-.71-.17-.83-.6-.8-2.85 12.05-4.05 10.97-8.17-.19-.73-.7-1.02-1.44-1.02-3.14 0-10.2 5.53-11.68 5.53-.1 0-.19-.03-.23-.1-.74-1.2-.34-2.04 4.88-5.2 5.23-3.16 8.9-5.06 6.8-7.33-.23-.26-.57-.38-.98-.38-3.18 0-10.67 6.82-10.67 6.82s-2.02 2.1-3.24 2.1a.74.74 0 0 1-.68-.38c-.87-1.46 8.05-8.22 8.55-11.01.34-1.9-.24-2.85-1.31-2.85Z"></path><path fill="#FFD21E" d="M56.33 76.69c-2.75-4.04-2.56-7.07 1.22-10.84 3.77-3.77 5.97-9.3 5.97-9.3s.82-3.2 2.7-2.9c1.86.3 3.23 5.08-.68 8.01-3.92 2.93.78 4.92 2.28 2.17 1.51-2.75 5.63-9.82 7.76-11.18 2.13-1.35 3.64-.6 3.13 2.2-.5 2.79-9.42 9.55-8.55 11 .86 1.47 3.92-1.71 3.92-1.71s9.58-8.71 11.66-6.44c2.08 2.27-1.58 4.17-6.8 7.33-5.23 3.16-5.63 4-4.9 5.2.75 1.2 12.28-8.53 13.36-4.4 1.08 4.11-11.76 5.3-10.97 8.15.8 2.85 9.05-5.38 10.74-2.18 1.69 3.21-11.65 6.98-11.76 7.01-4.31 1.12-15.26 3.49-19.08-2.12Z"></path></svg> <span>Transformers</span> </div></a><a class="mb-1 mr-1 md:mb-1.5 md:mr-1.5 rounded-lg" href="/models?library=tensorboard"><div class="tag tag-white "> <span>TensorBoard</span> </div></a><a class="mb-1 mr-1 md:mb-1.5 md:mr-1.5 rounded-lg" href="/models?library=onnx"><div class="tag tag-white "><svg class="text-black inline-block text-sm" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M30.7,15h-.2L25.16,5.09a1.26,1.26,0,0,0,.15-.59A1.3,1.3,0,0,0,24,3.2a1.27,1.27,0,0,0-.93.4L12.43,1.48A1.29,1.29,0,1,0,10,2.24L1.7,14.13a1.21,1.21,0,0,0-.34-.05,1.3,1.3,0,0,0,0,2.59h0l4.5,11.07a1.38,1.38,0,0,0-.12.54,1.3,1.3,0,0,0,1.3,1.29,1.27,1.27,0,0,0,.94-.4l13.44,1.31A1.29,1.29,0,0,0,24,30.16a1.34,1.34,0,0,0-.31-.84l6.77-11.8h.22A1.3,1.3,0,0,0,32,16.24,1.28,1.28,0,0,0,30.7,15ZM23,5.29a1.26,1.26,0,0,0,.61.44l-2,15.37a1.29,1.29,0,0,0-.36.14L10,11.52a.93.93,0,0,0,.05-.34c0-.08,0-.17,0-.25Zm6.47,11.32-6.89,4.71a1.28,1.28,0,0,0-.17-.1L24.45,5.69h0l5.26,9.7a1.27,1.27,0,0,0-.32.86ZM8.57,9.9a1.28,1.28,0,0,0-1.09,1.28v.09L2.86,14,10,3.74ZM9,12.45a1.54,1.54,0,0,0,.47-.21l11.11,9.67a1.45,1.45,0,0,0-.08.47v.07l-12.4,5.1A1.3,1.3,0,0,0,7.34,27ZM20.87,23.24a1.22,1.22,0,0,0,.65.39L22.13,29a1.34,1.34,0,0,0-.59.61l-13-1.28Zm1.53.29a1.33,1.33,0,0,0,.72-1.16.83.83,0,0,0-.05-.32l6.3-4.33L23,28.8Zm.32-19.08L9.58,10.17l-.15-.1L11.1,2.91h.05a1.26,1.26,0,0,0,1.08-.59L22.72,4.41ZM2.66,15.38c0-.09,0-.17,0-.24l5.19-3.06a1.41,1.41,0,0,0,.36.27L6.5,26.86,2.22,16.34A1.28,1.28,0,0,0,2.66,15.38Z" fill="#333"></path><path d="M24.49,5.69l5.25,9.7a1.32,1.32,0,0,0-.32.86,1.49,1.49,0,0,0,0,.36l-6.88,4.71-.17-.1,2-15.53Z" fill="#dededd"></path><path d="M22.4,23.53a1.33,1.33,0,0,0,.72-1.16.83.83,0,0,0-.05-.32l6.3-4.33L23,28.8Z" fill="#b2b2b2"></path><path d="M20.87,23.24a1.22,1.22,0,0,0,.65.39L22.13,29a1.34,1.34,0,0,0-.59.61l-13-1.28Z" fill="#d1d1d1"></path><path d="M9,12.45a1.54,1.54,0,0,0,.47-.21l11.11,9.67a1.45,1.45,0,0,0-.08.47v.07l-12.4,5.1A1.3,1.3,0,0,0,7.34,27Z" fill="#f2f2f2"></path><path d="M2.66,15.38c0-.09,0-.17,0-.24l5.19-3.06a1.41,1.41,0,0,0,.36.27L6.5,26.86,2.22,16.34A1.28,1.28,0,0,0,2.66,15.38Z" fill="#d8d8d7"></path><path d="M8.57,9.9a1.28,1.28,0,0,0-1.09,1.28v.09L2.86,14,10,3.74Z" fill="#b2b2b2"></path><path d="M22.72,4.45,9.58,10.17l-.15-.1L11.1,2.91h.05a1.26,1.26,0,0,0,1.08-.59L22.72,4.41Z" fill="#d1d1d1"></path><path d="M23,5.29a1.26,1.26,0,0,0,.61.44l-2,15.37a1.29,1.29,0,0,0-.36.14L10,11.52a.93.93,0,0,0,.05-.34c0-.08,0-.17,0-.25Z" fill="#fff"></path></svg> <span>ONNX</span> </div></a><a class="mb-1 mr-1 md:mb-1.5 md:mr-1.5 rounded-lg" href="/models?library=safetensors"><div class="tag tag-white "><svg class="text-black inline-block text-sm" viewBox="0 0 57 44" fill="none" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet"><path d="M36.816 20.1474L54.9918 27.4409C55.5142 27.6506 55.9623 28.0112 56.2788 28.4766C56.5954 28.9421 56.7661 29.4913 56.7691 30.0542C56.7722 30.6171 56.6074 31.1682 56.2959 31.637C55.9844 32.1059 55.5402 32.4713 55.0201 32.6866L29.953 43.0646C29.2593 43.3518 28.4799 43.3518 27.7862 43.0646L2.71624 32.6894C2.19613 32.4741 1.75197 32.1087 1.44044 31.6398C1.12892 31.171 0.964165 30.62 0.967204 30.057C0.970244 29.4941 1.14094 28.9449 1.45751 28.4794C1.77408 28.014 2.22216 27.6534 2.74456 27.4437L21.2404 20.0227C22.2997 19.5979 25.6477 20.8441 28.8682 20.8555C32.3096 20.8668 35.6292 19.6715 36.816 20.1474ZM11.3042 30.1119L28.8682 37.3828L46.435 30.1119L28.8682 23.0619L11.3042 30.1119ZM29.9247 0.388251L54.9918 10.4462C55.5142 10.6559 55.9623 11.0165 56.2788 11.482C56.5954 11.9474 56.7661 12.4967 56.7691 13.0596C56.7722 13.6225 56.6074 14.1735 56.2959 14.6424C55.9844 15.1112 55.5402 15.4766 55.0201 15.6919L29.953 26.07C29.2593 26.3572 28.4799 26.3572 27.7862 26.07L2.71624 15.6948C2.19613 15.4795 1.75197 15.1141 1.44044 14.6452C1.12892 14.1763 0.964165 13.6253 0.967204 13.0624C0.970244 12.4995 1.14094 11.9503 1.45751 11.4848C1.77408 11.0193 2.22216 10.6588 2.74456 10.4491L27.8117 0.388251C28.4896 0.1157 29.2467 0.1157 29.9247 0.388251ZM11.3042 13.1172L28.8682 20.3881L46.435 13.1172L28.8682 6.06729L11.3042 13.1172Z" fill="currentColor"></path></svg> <span>Safetensors</span> </div></a><a class="mb-1 mr-1 md:mb-1.5 md:mr-1.5 rounded-lg" href="/models?library=transformers.js"><div class="tag tag-white "><svg class="text-black inline-block text-sm" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><rect width="32" height="32" fill="#f7df1e"></rect><path d="M21.5,25a3.27,3.27,0,0,0,3,1.83c1.25,0,2-.63,2-1.49,0-1-.81-1.39-2.19-2L23.56,23C21.39,22.1,20,20.94,20,18.49c0-2.25,1.72-4,4.41-4a4.44,4.44,0,0,1,4.27,2.41l-2.34,1.5a2,2,0,0,0-1.93-1.29,1.31,1.31,0,0,0-1.44,1.29c0,.9.56,1.27,1.85,1.83l.75.32c2.55,1.1,4,2.21,4,4.72,0,2.71-2.12,4.19-5,4.19a5.78,5.78,0,0,1-5.48-3.07Zm-10.63.26c.48.84.91,1.55,1.94,1.55s1.61-.39,1.61-1.89V14.69h3V25c0,3.11-1.83,4.53-4.49,4.53a4.66,4.66,0,0,1-4.51-2.75Z"></path></svg> <span>Transformers.js</span> </div></a><a class="mb-1 mr-1 md:mb-1.5 md:mr-1.5 rounded-lg" href="/models?language=en"><div class="tag tag-white "> <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="text-green-600/80" preserveAspectRatio="xMidYMid meet" width="1em" height="1em" viewBox="0 0 10 10"><path fill-rule="evenodd" clip-rule="evenodd" d="M0.625 5C0.625 6.16032 1.08594 7.27312 1.90641 8.09359C2.72688 8.91406 3.83968 9.375 5 9.375C6.16032 9.375 7.27312 8.91406 8.09359 8.09359C8.91406 7.27312 9.375 6.16032 9.375 5C9.375 3.83968 8.91406 2.72688 8.09359 1.90641C7.27312 1.08594 6.16032 0.625 5 0.625C3.83968 0.625 2.72688 1.08594 1.90641 1.90641C1.08594 2.72688 0.625 3.83968 0.625 5ZM7.64365 7.48027C7.61734 7.50832 7.59054 7.53598 7.56326 7.56326C7.13828 7.98824 6.61864 8.2968 6.0539 8.46842C6.29802 8.11949 6.49498 7.64804 6.63475 7.09483C7.00845 7.18834 7.35014 7.3187 7.64365 7.48027ZM8.10076 6.87776C8.37677 6.42196 8.55005 5.90894 8.60556 5.37499H6.86808C6.85542 5.71597 6.82551 6.04557 6.77971 6.35841C7.25309 6.47355 7.68808 6.6414 8.062 6.85549C8.07497 6.86283 8.08789 6.87025 8.10076 6.87776ZM6.03795 6.22536C6.07708 5.95737 6.1044 5.67232 6.11705 5.37499H3.88295C3.89666 5.69742 3.92764 6.00542 3.9722 6.29287C4.37075 6.21726 4.79213 6.17749 5.224 6.17749C5.50054 6.17749 5.77294 6.19376 6.03795 6.22536ZM4.1261 7.02673C4.34894 7.84835 4.68681 8.375 5 8.375C5.32122 8.375 5.66839 7.82101 5.8908 6.963C5.67389 6.93928 5.45082 6.92699 5.224 6.92699C4.84316 6.92699 4.47332 6.96176 4.1261 7.02673ZM3.39783 7.21853C3.53498 7.71842 3.72038 8.14579 3.9461 8.46842C3.42141 8.30898 2.93566 8.03132 2.52857 7.65192C2.77253 7.48017 3.06711 7.33382 3.39783 7.21853ZM3.23916 6.48077C3.18263 6.13193 3.14625 5.76074 3.13192 5.37499H1.39444C1.4585 5.99112 1.67936 6.57938 2.03393 7.08403C2.3706 6.83531 2.78055 6.63162 3.23916 6.48077ZM1.39444 4.62499H3.13192C3.14615 4.24204 3.18211 3.87344 3.23794 3.52681C2.77814 3.37545 2.36731 3.17096 2.03024 2.92123C1.67783 3.42469 1.45828 4.011 1.39444 4.62499ZM2.5237 2.35262C2.76812 2.52552 3.06373 2.67281 3.39584 2.78875C3.53318 2.28573 3.71928 1.85578 3.9461 1.53158C3.41932 1.69166 2.93178 1.97089 2.5237 2.35262ZM3.97101 3.71489C3.92709 4.00012 3.89654 4.30547 3.88295 4.62499H6.11705C6.10453 4.33057 6.07761 4.04818 6.03909 3.78248C5.77372 3.81417 5.50093 3.83049 5.224 3.83049C4.79169 3.83049 4.3699 3.79065 3.97101 3.71489ZM5.8928 3.04476C5.67527 3.06863 5.45151 3.08099 5.224 3.08099C4.84241 3.08099 4.47186 3.04609 4.12405 2.98086C4.34686 2.1549 4.68584 1.625 5 1.625C5.32218 1.625 5.67048 2.18233 5.8928 3.04476ZM6.78083 3.6493C6.826 3.95984 6.85552 4.28682 6.86808 4.62499H8.60556C8.55029 4.09337 8.37827 3.58251 8.10436 3.1282C8.0903 3.1364 8.07618 3.14449 8.062 3.15249C7.68838 3.36641 7.25378 3.53417 6.78083 3.6493ZM7.64858 2.52499C7.35446 2.68754 7.0117 2.81868 6.63664 2.91268C6.49676 2.35623 6.29913 1.88209 6.0539 1.53158C6.61864 1.7032 7.13828 2.01176 7.56326 2.43674C7.59224 2.46572 7.62068 2.49514 7.64858 2.52499Z" fill="currentColor"></path></svg> <span>English</span> </div></a><a class="mb-1 mr-1 md:mb-1.5 md:mr-1.5 rounded-lg" href="/models?other=llama"><div class="tag tag-white "> <span>llama</span> </div></a><a class="mb-1 mr-1 md:mb-1.5 md:mr-1.5 rounded-lg" href="/models?other=conversational"><div class="tag tag-white "> <span>conversational</span> </div></a><a class="mb-1 mr-1 md:mb-1.5 md:mr-1.5 rounded-lg" href="/models?other=text-generation-inference"><div class="tag tag-white "> <svg class="" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 12 12"><path fill="#23B0FF" d="m9.6 3.6-3.2-2a1 1 0 0 0-1.1 0L2 3.7a1 1 0 0 0-.3 1.6H10a1 1 0 0 0-.3-1.6Z"></path><path fill="#2094FF" d="m6.7 9.7 3.2-4.5-.4-.8H5.7v4.8l1 .5Z"></path><path fill="#6BCAFF" d="M4.9 9.7 1.7 5.2l.4-.8h3.8v4.8l-1 .5Z"></path><path fill="#000" fill-rule="evenodd" d="M9.9 3.2c.8.5 1 1.5.5 2.3L7 10c-.6.9-2 .9-2.6 0L1.3 5.5c-.5-.8-.3-1.8.5-2.3l3.2-2c.5-.3 1.2-.3 1.7 0l3.2 2ZM6.4 5h3l-3 4.2V5ZM5.3 5h-3l3 4.2V5Zm3.8-1L6 2a.5.5 0 0 0-.5 0L2.6 4H9Z" clip-rule="evenodd"></path></svg> <span>text-generation-inference</span> </div></a><a class="mb-1 mr-1 md:mb-1.5 md:mr-1.5 rounded-lg" href="/models?other=endpoints_compatible"><div class="tag tag-white "> <svg class="" width="1em" height="1em" viewBox="0 0 74 75" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M46.6517 14.9309C48.2799 11.0495 45.4292 6.76251 41.2202 6.76251H24.1817C19.8066 6.76251 15.9021 9.50789 14.4218 13.6249L8.51785 30.0453C6.77792 34.8844 6.77792 40.1785 8.51785 45.0177L14.4218 61.438C15.9021 65.5551 19.8066 68.3004 24.1817 68.3004H41.2202C45.4292 68.3004 48.2799 64.0134 46.6517 60.132L40.7616 46.0903C38.465 40.6155 38.465 34.4475 40.7616 28.9727L46.6517 14.9309Z" fill="#861FFF" stroke="black" stroke-width="12.6835" stroke-linejoin="round"></path><circle cx="53.1334" cy="37.5315" r="13.9518" fill="#FF3270" stroke="black" stroke-width="12.6835" stroke-linejoin="round"></circle></svg> <span>Inference Endpoints</span> </div></a><div class="relative inline-block "> <button class="group mr-1 mb-1 md:mr-1.5 md:mb-1.5 rounded-full rounded-br-none " type="button"> <div class="tag tag-white rounded-full relative rounded-br-none pr-2.5"> <svg class="text-xs text-gray-900" width="1em" height="1em" viewBox="0 0 10 10" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M1.46009 5.0945V6.88125C1.46009 7.25201 1.75937 7.55129 2.13012 7.55129C2.50087 7.55129 2.80016 7.25201 2.80016 6.88125V5.0945C2.80016 4.72375 2.50087 4.42446 2.13012 4.42446C1.75937 4.42446 1.46009 4.72375 1.46009 5.0945ZM4.14022 5.0945V6.88125C4.14022 7.25201 4.4395 7.55129 4.81026 7.55129C5.18101 7.55129 5.48029 7.25201 5.48029 6.88125V5.0945C5.48029 4.72375 5.18101 4.42446 4.81026 4.42446C4.4395 4.42446 4.14022 4.72375 4.14022 5.0945ZM1.23674 9.78473H8.38377C8.75452 9.78473 9.0538 9.48545 9.0538 9.1147C9.0538 8.74395 8.75452 8.44466 8.38377 8.44466H1.23674C0.865993 8.44466 0.566711 8.74395 0.566711 9.1147C0.566711 9.48545 0.865993 9.78473 1.23674 9.78473ZM6.82036 5.0945V6.88125C6.82036 7.25201 7.11964 7.55129 7.49039 7.55129C7.86114 7.55129 8.16042 7.25201 8.16042 6.88125V5.0945C8.16042 4.72375 7.86114 4.42446 7.49039 4.42446C7.11964 4.42446 6.82036 4.72375 6.82036 5.0945ZM4.39484 0.623142L0.865993 2.48137C0.682851 2.57517 0.566711 2.76725 0.566711 2.97273C0.566711 3.28094 0.816857 3.53109 1.12507 3.53109H8.49991C8.80365 3.53109 9.0538 3.28094 9.0538 2.97273C9.0538 2.76725 8.93766 2.57517 8.75452 2.48137L5.22568 0.623142C4.9666 0.484669 4.65391 0.484669 4.39484 0.623142V0.623142Z" fill="currentColor"></path></svg> <span class="-mr-1 text-gray-400">License:</span> <span>apache-2.0</span> <div class="border-br-gray-200 absolute bottom-0.5 right-0.5 h-1 w-1 border-[3px] border-l-transparent border-t-transparent border-b-gray-200 border-r-gray-200 dark:border-b-gray-700 dark:border-r-gray-700"></div></div> </button> </div></div> <div class="flex flex-col-reverse lg:flex-row lg:items-center lg:justify-between"><div class="-mb-px flex h-12 items-center overflow-x-auto overflow-y-hidden "><a class="tab-alternate active" href="/HuggingFaceTB/SmolLM2-1.7B-Instruct"><svg class="mr-1.5 text-gray-400 flex-none" style="" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 24 24"><path class="uim-quaternary" d="M20.23 7.24L12 12L3.77 7.24a1.98 1.98 0 0 1 .7-.71L11 2.76c.62-.35 1.38-.35 2 0l6.53 3.77c.29.173.531.418.7.71z" opacity=".25" fill="currentColor"></path><path class="uim-tertiary" d="M12 12v9.5a2.09 2.09 0 0 1-.91-.21L4.5 17.48a2.003 2.003 0 0 1-1-1.73v-7.5a2.06 2.06 0 0 1 .27-1.01L12 12z" opacity=".5" fill="currentColor"></path><path class="uim-primary" d="M20.5 8.25v7.5a2.003 2.003 0 0 1-1 1.73l-6.62 3.82c-.275.13-.576.198-.88.2V12l8.23-4.76c.175.308.268.656.27 1.01z" fill="currentColor"></path></svg> Model card </a><a class="tab-alternate " href="/HuggingFaceTB/SmolLM2-1.7B-Instruct/tree/main"><svg class="mr-1.5 text-gray-400 flex-none" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 24 24"><path class="uim-tertiary" d="M21 19h-8a1 1 0 0 1 0-2h8a1 1 0 0 1 0 2zm0-4h-8a1 1 0 0 1 0-2h8a1 1 0 0 1 0 2zm0-8h-8a1 1 0 0 1 0-2h8a1 1 0 0 1 0 2zm0 4h-8a1 1 0 0 1 0-2h8a1 1 0 0 1 0 2z" opacity=".5" fill="currentColor"></path><path class="uim-primary" d="M9 19a1 1 0 0 1-1-1V6a1 1 0 0 1 2 0v12a1 1 0 0 1-1 1zm-6-4.333a1 1 0 0 1-.64-1.769L3.438 12l-1.078-.898a1 1 0 0 1 1.28-1.538l2 1.667a1 1 0 0 1 0 1.538l-2 1.667a.999.999 0 0 1-.64.231z" fill="currentColor"></path></svg> <span class="xl:hidden">Files</span> <span class="hidden xl:inline">Files and versions</span> </a><a class="tab-alternate " href="/HuggingFaceTB/SmolLM2-1.7B-Instruct/tensorboard"><svg class="opacity-50 dark:opacity-70 mr-1.5 text-gray-400 flex-none" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid" viewBox="0 0 32 32"><path d="M16.7633 2.2712L28.4848 8.93939V15.0345L21.4519 10.919V13.9926L24.9423 16.0243L24.9944 21.286L21.4519 19.2542V26.9643L16.7633 29.6733V2.2712ZM15.7214 2.2712V29.6733L11.0329 26.9643V10.919L4 15.0345V8.93939L15.7214 2.2712Z" fill="currentColor"></path></svg> <span class="xl:hidden">Metrics</span> <span class="hidden xl:inline">Training metrics</span> </a><a class="tab-alternate " href="/HuggingFaceTB/SmolLM2-1.7B-Instruct/discussions"><svg class="mr-1.5 text-gray-400 flex-none" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M20.6081 3C21.7684 3 22.8053 3.49196 23.5284 4.38415C23.9756 4.93678 24.4428 5.82749 24.4808 7.16133C24.9674 7.01707 25.4353 6.93643 25.8725 6.93643C26.9833 6.93643 27.9865 7.37587 28.696 8.17411C29.6075 9.19872 30.0124 10.4579 29.8361 11.7177C29.7523 12.3177 29.5581 12.8555 29.2678 13.3534C29.8798 13.8646 30.3306 14.5763 30.5485 15.4322C30.719 16.1032 30.8939 17.5006 29.9808 18.9403C30.0389 19.0342 30.0934 19.1319 30.1442 19.2318C30.6932 20.3074 30.7283 21.5229 30.2439 22.6548C29.5093 24.3704 27.6841 25.7219 24.1397 27.1727C21.9347 28.0753 19.9174 28.6523 19.8994 28.6575C16.9842 29.4379 14.3477 29.8345 12.0653 29.8345C7.87017 29.8345 4.8668 28.508 3.13831 25.8921C0.356375 21.6797 0.754104 17.8269 4.35369 14.1131C6.34591 12.058 7.67023 9.02782 7.94613 8.36275C8.50224 6.39343 9.97271 4.20438 12.4172 4.20438H12.4179C12.6236 4.20438 12.8314 4.2214 13.0364 4.25468C14.107 4.42854 15.0428 5.06476 15.7115 6.02205C16.4331 5.09583 17.134 4.359 17.7682 3.94323C18.7242 3.31737 19.6794 3 20.6081 3ZM20.6081 5.95917C20.2427 5.95917 19.7963 6.1197 19.3039 6.44225C17.7754 7.44319 14.8258 12.6772 13.7458 14.7131C13.3839 15.3952 12.7655 15.6837 12.2086 15.6837C11.1036 15.6837 10.2408 14.5497 12.1076 13.1085C14.9146 10.9402 13.9299 7.39584 12.5898 7.1776C12.5311 7.16799 12.4731 7.16355 12.4172 7.16355C11.1989 7.16355 10.6615 9.33114 10.6615 9.33114C10.6615 9.33114 9.0863 13.4148 6.38031 16.206C3.67434 18.998 3.5346 21.2388 5.50675 24.2246C6.85185 26.2606 9.42666 26.8753 12.0653 26.8753C14.8021 26.8753 17.6077 26.2139 19.1799 25.793C19.2574 25.7723 28.8193 22.984 27.6081 20.6107C27.4046 20.212 27.0693 20.0522 26.6471 20.0522C24.9416 20.0522 21.8393 22.6726 20.5057 22.6726C20.2076 22.6726 19.9976 22.5416 19.9116 22.222C19.3433 20.1173 28.552 19.2325 27.7758 16.1839C27.639 15.6445 27.2677 15.4256 26.746 15.4263C24.4923 15.4263 19.4358 19.5181 18.3759 19.5181C18.2949 19.5181 18.2368 19.4937 18.2053 19.4419C17.6743 18.557 17.9653 17.9394 21.7082 15.6009C25.4511 13.2617 28.0783 11.8545 26.5841 10.1752C26.4121 9.98141 26.1684 9.8956 25.8725 9.8956C23.6001 9.89634 18.2311 14.9403 18.2311 14.9403C18.2311 14.9403 16.7821 16.496 15.9057 16.496C15.7043 16.496 15.533 16.4139 15.4169 16.2112C14.7956 15.1296 21.1879 10.1286 21.5484 8.06535C21.7928 6.66715 21.3771 5.95917 20.6081 5.95917Z" fill="#FF9D00"></path><path d="M5.50686 24.2246C3.53472 21.2387 3.67446 18.9979 6.38043 16.206C9.08641 13.4147 10.6615 9.33111 10.6615 9.33111C10.6615 9.33111 11.2499 6.95933 12.59 7.17757C13.93 7.39581 14.9139 10.9401 12.1069 13.1084C9.29997 15.276 12.6659 16.7489 13.7459 14.713C14.8258 12.6772 17.7747 7.44316 19.304 6.44221C20.8326 5.44128 21.9089 6.00204 21.5484 8.06532C21.188 10.1286 14.795 15.1295 15.4171 16.2118C16.0391 17.2934 18.2312 14.9402 18.2312 14.9402C18.2312 14.9402 25.0907 8.49588 26.5842 10.1752C28.0776 11.8545 25.4512 13.2616 21.7082 15.6008C17.9646 17.9393 17.6744 18.557 18.2054 19.4418C18.7372 20.3266 26.9998 13.1351 27.7759 16.1838C28.5513 19.2324 19.3434 20.1173 19.9117 22.2219C20.48 24.3274 26.3979 18.2382 27.6082 20.6107C28.8193 22.9839 19.2574 25.7722 19.18 25.7929C16.0914 26.62 8.24723 28.3726 5.50686 24.2246Z" fill="#FFD21E"></path></svg> Community <div class="ml-1.5 flex h-4 min-w-[1rem] items-center justify-center rounded px-1 text-xs leading-none shadow-sm bg-black text-white dark:bg-gray-800 dark:text-gray-200">18 </div> </a> </div> <div class="relative mb-1.5 flex flex-wrap gap-1.5 sm:flex-nowrap lg:mb-0"><div class="order-last sm:order-first"><div class="relative "> <button class="btn px-1.5 py-1.5 " type="button"> <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="p-0.5" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><circle cx="16" cy="7" r="3" fill="currentColor"></circle><circle cx="16" cy="16" r="3" fill="currentColor"></circle><circle cx="16" cy="25" r="3" fill="currentColor"></circle></svg> </button> </div></div> <div class="flex-none w-full sm:w-auto"><div class="relative "> <button class="text-sm btn btn w-full cursor-pointer text-sm" type="button"> <svg class="mr-1.5 " xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M12.1 2a9.8 9.8 0 0 0-5.4 1.6l6.4 6.4a2.1 2.1 0 0 1 .2 3a2.1 2.1 0 0 1-3-.2L3.7 6.4A9.84 9.84 0 0 0 2 12.1a10.14 10.14 0 0 0 10.1 10.1a10.9 10.9 0 0 0 2.6-.3l6.7 6.7a5 5 0 0 0 7.1-7.1l-6.7-6.7a10.9 10.9 0 0 0 .3-2.6A10 10 0 0 0 12.1 2zm8 10.1a7.61 7.61 0 0 1-.3 2.1l-.3 1.1l.8.8l6.7 6.7a2.88 2.88 0 0 1 .9 2.1A2.72 2.72 0 0 1 27 27a2.9 2.9 0 0 1-4.2 0l-6.7-6.7l-.8-.8l-1.1.3a7.61 7.61 0 0 1-2.1.3a8.27 8.27 0 0 1-5.7-2.3A7.63 7.63 0 0 1 4 12.1a8.33 8.33 0 0 1 .3-2.2l4.4 4.4a4.14 4.14 0 0 0 5.9.2a4.14 4.14 0 0 0-.2-5.9L10 4.2a6.45 6.45 0 0 1 2-.3a8.27 8.27 0 0 1 5.7 2.3a8.49 8.49 0 0 1 2.4 5.9z" fill="currentColor"></path></svg> Train <svg class="-mr-1 text-gray-500" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 24 24"><path d="M16.293 9.293L12 13.586L7.707 9.293l-1.414 1.414L12 16.414l5.707-5.707z" fill="currentColor"></path></svg></button> </div> </div> <div class="flex-none w-full sm:w-auto"><div class="relative "> <button class="text-sm btn btn w-full cursor-pointer text-sm" type="button"> <svg class="mr-1.5 " xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><rect x="6.34" y="19" width="11.31" height="2" transform="translate(-10.63 14.34) rotate(-45)"></rect><path d="M17,30a1,1,0,0,1-.37-.07,1,1,0,0,1-.62-.79l-1-7,2-.28.75,5.27L21,24.52V17a1,1,0,0,1,.29-.71l4.07-4.07A8.94,8.94,0,0,0,28,5.86V4H26.14a8.94,8.94,0,0,0-6.36,2.64l-4.07,4.07A1,1,0,0,1,15,11H7.48L4.87,14.26l5.27.75-.28,2-7-1a1,1,0,0,1-.79-.62,1,1,0,0,1,.15-1l4-5A1,1,0,0,1,7,9h7.59l3.77-3.78A10.92,10.92,0,0,1,26.14,2H28a2,2,0,0,1,2,2V5.86a10.92,10.92,0,0,1-3.22,7.78L23,17.41V25a1,1,0,0,1-.38.78l-5,4A1,1,0,0,1,17,30Z"></path></svg> Deploy <svg class="-mr-1 text-gray-500" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 24 24"><path d="M16.293 9.293L12 13.586L7.707 9.293l-1.414 1.414L12 16.414l5.707-5.707z" fill="currentColor"></path></svg></button> </div> </div> <div class="relative flex-auto sm:flex-none"> <button class="!from-gray-800 !to-black !text-white !gap-1 !border-gray-800 dark:!border-gray-900 btn w-full cursor-pointer text-sm" type="button"> <svg class="mr-1.5 !mr-0.5 " xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path fill="currentColor" d="M28 4H4a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h8v4H8v2h16v-2h-4v-4h8a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2ZM18 28h-4v-4h4Zm10-6H4V6h24Z"></path></svg> Use this model <svg class="-mr-1 text-gray-500" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 24 24"><path d="M16.293 9.293L12 13.586L7.707 9.293l-1.414 1.414L12 16.414l5.707-5.707z" fill="currentColor"></path></svg></button> </div> </div> </div></div></header> </div> <div class="container relative flex flex-col md:grid md:space-y-0 w-full md:grid-cols-12 md:flex-1 md:grid-rows-full space-y-4 md:gap-6 "><section class="pt-8 border-gray-100 md:col-span-7 pb-24 relative break-words copiable-code-container"><div class="SVELTE_HYDRATER contents" data-target="UnsafeBanner" data-props="{"classNames":"mb-6 md:mb-4 mt-0","repoId":"HuggingFaceTB/SmolLM2-1.7B-Instruct","repoType":"model","minLevel":"unsafe"}"></div> <a class="btn mb-6 text-sm text-gray-600 md:absolute md:-right-6 md:top-0 md:mb-0 md:rounded-r-none md:rounded-t-none md:border-r-0 md:border-t-0 md:border-gray-100 md:bg-none" href="/HuggingFaceTB/SmolLM2-1.7B-Instruct/edit/main/README.md"><svg class="mr-1.5" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M2 26h28v2H2z" fill="currentColor"></path><path d="M25.4 9c.8-.8.8-2 0-2.8l-3.6-3.6c-.8-.8-2-.8-2.8 0l-15 15V24h6.4l15-15zm-5-5L24 7.6l-3 3L17.4 7l3-3zM6 22v-3.6l10-10l3.6 3.6l-10 10H6z" fill="currentColor"></path></svg> Edit model card </a> <div class="SVELTE_HYDRATER contents" data-target="RepoCodeCopy" data-props="{}"><div></div></div> <div class="relative md:mt-2"><div class="SVELTE_HYDRATER contents" data-target="SideNavigation" data-props="{"titleTree":[{"id":"smollm2","label":"SmolLM2","children":[{"id":"table-of-contents","label":"Table of Contents","children":[],"isValid":true,"title":"Table of Contents"},{"id":"model-summary","label":"Model Summary","children":[{"id":"how-to-use","label":"How to use","children":[],"isValid":false,"title":"How to use"},{"id":"transformers","label":"Transformers","children":[],"isValid":true,"title":"Transformers"},{"id":"chat-in-trl","label":"Chat in TRL","children":[],"isValid":true,"title":"Chat in TRL"}],"isValid":true,"title":"Model Summary"},{"id":"evaluation","label":"Evaluation","children":[],"isValid":true,"title":"Evaluation"},{"id":"base-pre-trained-model","label":"Base Pre-Trained Model","children":[],"isValid":true,"title":"Base Pre-Trained Model"},{"id":"instruction-model","label":"Instruction Model","children":[],"isValid":true,"title":"Instruction Model"},{"id":"examples","label":"Examples","children":[{"id":"text-rewriting","label":"Text rewriting","children":[],"isValid":true,"title":"Text rewriting"},{"id":"summarization","label":"Summarization","children":[],"isValid":true,"title":"Summarization"},{"id":"function-calling","label":"Function calling","children":[],"isValid":true,"title":"Function calling"}],"isValid":true,"title":"Examples"},{"id":"limitations","label":"Limitations","children":[],"isValid":true,"title":"Limitations"},{"id":"training","label":"Training","children":[{"id":"model","label":"Model","children":[],"isValid":true,"title":"Model"},{"id":"hardware","label":"Hardware","children":[],"isValid":true,"title":"Hardware"},{"id":"software","label":"Software","children":[],"isValid":true,"title":"Software"}],"isValid":true,"title":"Training"},{"id":"license","label":"License","children":[],"isValid":true,"title":"License"},{"id":"citation","label":"Citation","children":[],"isValid":true,"title":"Citation"}],"isValid":true,"title":"SmolLM2"}]}"> <div class="absolute -left-12 bottom-0 top-0 z-10 "><div class="sticky top-4 flex"><div class="h-7 pt-[0.175rem]"> <span class="peer" tabindex="0"><button class="select-none hover:cursor-pointer"><svg width="1em" height="1em" viewBox="0 0 10 10" class="text-lg opacity-80 hover:opacity-100" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" focusable="false" role="img" preserveAspectRatio="xMidYMid meet" fill="currentColor"><path fill-rule="evenodd" clip-rule="evenodd" d="M1.65039 2.9999C1.65039 2.8066 1.80709 2.6499 2.00039 2.6499H8.00039C8.19369 2.6499 8.35039 2.8066 8.35039 2.9999C8.35039 3.1932 8.19369 3.3499 8.00039 3.3499H2.00039C1.80709 3.3499 1.65039 3.1932 1.65039 2.9999ZM1.65039 4.9999C1.65039 4.8066 1.80709 4.6499 2.00039 4.6499H8.00039C8.19369 4.6499 8.35039 4.8066 8.35039 4.9999C8.35039 5.1932 8.19369 5.3499 8.00039 5.3499H2.00039C1.80709 5.3499 1.65039 5.1932 1.65039 4.9999ZM2.00039 6.6499C1.80709 6.6499 1.65039 6.8066 1.65039 6.9999C1.65039 7.1932 1.80709 7.3499 2.00039 7.3499H8.00039C8.19369 7.3499 8.35039 7.1932 8.35039 6.9999C8.35039 6.8066 8.19369 6.6499 8.00039 6.6499H2.00039Z"></path></svg></button></span> <div class="invisible w-0 -translate-x-24 -translate-y-6 overflow-hidden rounded-xl border bg-white transition-transform hover:visible hover:w-52 hover:translate-x-0 peer-focus-within:visible peer-focus-within:w-52 peer-focus-within:translate-x-0"><nav aria-label="Secondary" class="max-h-[550px] overflow-y-auto p-3"><ul><li class="mb-3 text-sm last:mb-0"><a class="mb-1 block break-words font-semibold text-gray-700 hover:underline active:text-gray-900 dark:active:text-gray-200 [&>*]:break-words" href="#smollm2" title="SmolLM2"><!-- HTML_TAG_START -->SmolLM2<!-- HTML_TAG_END --></a> <ul class="pl-1"><li><a class="mb-0.5 block break-words hover:underline active:text-gray-700 dark:active:text-gray-300 text-gray-500" href="#table-of-contents" title="Table of Contents"><!-- HTML_TAG_START -->Table of Contents<!-- HTML_TAG_END --></a> <ul class="pl-2"></ul> </li><li><a class="mb-0.5 block break-words hover:underline active:text-gray-700 dark:active:text-gray-300 text-gray-500" href="#model-summary" title="Model Summary"><!-- HTML_TAG_START -->Model Summary<!-- HTML_TAG_END --></a> <ul class="pl-2"><li><a class="mb-0.5 block break-words hover:underline active:text-gray-700 dark:active:text-gray-300 text-gray-300 dark:text-gray-700" href="#how-to-use" title="How to use"><!-- HTML_TAG_START -->How to use<!-- HTML_TAG_END --></a> </li><li><a class="mb-0.5 block break-words hover:underline active:text-gray-700 dark:active:text-gray-300 text-gray-500" href="#transformers" title="Transformers"><!-- HTML_TAG_START -->Transformers<!-- HTML_TAG_END --></a> </li><li><a class="mb-0.5 block break-words hover:underline active:text-gray-700 dark:active:text-gray-300 text-gray-500" href="#chat-in-trl" title="Chat in TRL"><!-- HTML_TAG_START -->Chat in TRL<!-- HTML_TAG_END --></a> </li></ul> </li><li><a class="mb-0.5 block break-words hover:underline active:text-gray-700 dark:active:text-gray-300 text-gray-500" href="#evaluation" title="Evaluation"><!-- HTML_TAG_START -->Evaluation<!-- HTML_TAG_END --></a> <ul class="pl-2"></ul> </li><li><a class="mb-0.5 block break-words hover:underline active:text-gray-700 dark:active:text-gray-300 text-gray-500" href="#base-pre-trained-model" title="Base Pre-Trained Model"><!-- HTML_TAG_START -->Base Pre-Trained Model<!-- HTML_TAG_END --></a> <ul class="pl-2"></ul> </li><li><a class="mb-0.5 block break-words hover:underline active:text-gray-700 dark:active:text-gray-300 text-gray-500" href="#instruction-model" title="Instruction Model"><!-- HTML_TAG_START -->Instruction Model<!-- HTML_TAG_END --></a> <ul class="pl-2"></ul> </li><li><a class="mb-0.5 block break-words hover:underline active:text-gray-700 dark:active:text-gray-300 text-gray-500" href="#examples" title="Examples"><!-- HTML_TAG_START -->Examples<!-- HTML_TAG_END --></a> <ul class="pl-2"><li><a class="mb-0.5 block break-words hover:underline active:text-gray-700 dark:active:text-gray-300 text-gray-500" href="#text-rewriting" title="Text rewriting"><!-- HTML_TAG_START -->Text rewriting<!-- HTML_TAG_END --></a> </li><li><a class="mb-0.5 block break-words hover:underline active:text-gray-700 dark:active:text-gray-300 text-gray-500" href="#summarization" title="Summarization"><!-- HTML_TAG_START -->Summarization<!-- HTML_TAG_END --></a> </li><li><a class="mb-0.5 block break-words hover:underline active:text-gray-700 dark:active:text-gray-300 text-gray-500" href="#function-calling" title="Function calling"><!-- HTML_TAG_START -->Function calling<!-- HTML_TAG_END --></a> </li></ul> </li><li><a class="mb-0.5 block break-words hover:underline active:text-gray-700 dark:active:text-gray-300 text-gray-500" href="#limitations" title="Limitations"><!-- HTML_TAG_START -->Limitations<!-- HTML_TAG_END --></a> <ul class="pl-2"></ul> </li><li><a class="mb-0.5 block break-words hover:underline active:text-gray-700 dark:active:text-gray-300 text-gray-500" href="#training" title="Training"><!-- HTML_TAG_START -->Training<!-- HTML_TAG_END --></a> <ul class="pl-2"><li><a class="mb-0.5 block break-words hover:underline active:text-gray-700 dark:active:text-gray-300 text-gray-500" href="#model" title="Model"><!-- HTML_TAG_START -->Model<!-- HTML_TAG_END --></a> </li><li><a class="mb-0.5 block break-words hover:underline active:text-gray-700 dark:active:text-gray-300 text-gray-500" href="#hardware" title="Hardware"><!-- HTML_TAG_START -->Hardware<!-- HTML_TAG_END --></a> </li><li><a class="mb-0.5 block break-words hover:underline active:text-gray-700 dark:active:text-gray-300 text-gray-500" href="#software" title="Software"><!-- HTML_TAG_START -->Software<!-- HTML_TAG_END --></a> </li></ul> </li><li><a class="mb-0.5 block break-words hover:underline active:text-gray-700 dark:active:text-gray-300 text-gray-500" href="#license" title="License"><!-- HTML_TAG_START -->License<!-- HTML_TAG_END --></a> <ul class="pl-2"></ul> </li><li><a class="mb-0.5 block break-words hover:underline active:text-gray-700 dark:active:text-gray-300 text-gray-500" href="#citation" title="Citation"><!-- HTML_TAG_START -->Citation<!-- HTML_TAG_END --></a> <ul class="pl-2"></ul> </li></ul> </li></ul></nav></div></div></div></div></div> <div class="SVELTE_HYDRATER contents" data-target="Hydrater" data-props="{"targetSelector":".model-card-content"}"></div> <div class="model-card-content prose md:px-6 md:-mx-6 lg:-mr-20 lg:pr-20 xl:-mr-24 xl:pr-24 2xl:-mr-36 2xl:pr-36 hf-sanitized hf-sanitized-VQ5ybwFiyFaT9j49mbki6"> <!-- HTML_TAG_START --><h1 class="relative group flex items-center"> <a rel="nofollow" href="#smollm2" class="block pr-1.5 text-lg md:absolute md:p-1.5 md:opacity-0 md:group-hover:opacity-100 md:right-full" id="smollm2"> <span class="header-link"><svg viewBox="0 0 256 256" preserveAspectRatio="xMidYMid meet" height="1em" width="1em" role="img" aria-hidden="true" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg" class="text-gray-500 hover:text-black dark:hover:text-gray-200 w-4"><path fill="currentColor" d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z"></path></svg></span> </a> <span> SmolLM2 </span> </h1> <p><a rel="nofollow" href="https://cdn-uploads.huggingface.co/production/uploads/61c141342aac764ce1654e43/y45hIMNREW7w_XpHYB_0q.png"><img alt="image/png" src="https://cdn-uploads.huggingface.co/production/uploads/61c141342aac764ce1654e43/y45hIMNREW7w_XpHYB_0q.png"></a></p> <h2 class="relative group flex items-center"> <a rel="nofollow" href="#table-of-contents" class="block pr-1.5 text-lg md:absolute md:p-1.5 md:opacity-0 md:group-hover:opacity-100 md:right-full" id="table-of-contents"> <span class="header-link"><svg viewBox="0 0 256 256" preserveAspectRatio="xMidYMid meet" height="1em" width="1em" role="img" aria-hidden="true" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg" class="text-gray-500 hover:text-black dark:hover:text-gray-200 w-4"><path fill="currentColor" d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z"></path></svg></span> </a> <span> Table of Contents </span> </h2> <ol> <li><a rel="nofollow" href="#model-summary">Model Summary</a></li> <li><a rel="nofollow" href="#evaluation">Evaluation</a></li> <li><a rel="nofollow" href="#examples">Examples</a></li> <li><a rel="nofollow" href="#limitations">Limitations</a></li> <li><a rel="nofollow" href="#training">Training</a></li> <li><a rel="nofollow" href="#license">License</a></li> <li><a rel="nofollow" href="#citation">Citation</a></li> </ol> <h2 class="relative group flex items-center"> <a rel="nofollow" href="#model-summary" class="block pr-1.5 text-lg md:absolute md:p-1.5 md:opacity-0 md:group-hover:opacity-100 md:right-full" id="model-summary"> <span class="header-link"><svg viewBox="0 0 256 256" preserveAspectRatio="xMidYMid meet" height="1em" width="1em" role="img" aria-hidden="true" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg" class="text-gray-500 hover:text-black dark:hover:text-gray-200 w-4"><path fill="currentColor" d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z"></path></svg></span> </a> <span> Model Summary </span> </h2> <p>SmolLM2 is a family of compact language models available in three size: 135M, 360M, and 1.7B parameters. They are capable of solving a wide range of tasks while being lightweight enough to run on-device.</p> <p>The 1.7B variant demonstrates significant advances over its predecessor SmolLM1-1.7B, particularly in instruction following, knowledge, reasoning, and mathematics. It was trained on 11 trillion tokens using a diverse dataset combination: FineWeb-Edu, DCLM, The Stack, along with new mathematics and coding datasets that we curated and will release soon. We developed the instruct version through supervised fine-tuning (SFT) using a combination of public datasets and our own curated datasets. We then applied Direct Preference Optimization (DPO) using <a rel="nofollow" href="https://huggingface.co/datasets/HuggingFaceH4/ultrafeedback_binarized">UltraFeedback</a>.</p> <p>The instruct model additionally supports tasks such as text rewriting, summarization and function calling thanks to datasets developed by <a rel="nofollow" href="https://huggingface.co/argilla">Argilla</a> such as <a rel="nofollow" href="https://huggingface.co/datasets/argilla/Synth-APIGen-v0.1">Synth-APIGen-v0.1</a>. You can find the SFT dataset here: <a rel="nofollow" href="https://huggingface.co/datasets/HuggingFaceTB/smoltalk">https://huggingface.co/datasets/HuggingFaceTB/smoltalk</a>.</p> <p>For more details refer to: <a rel="nofollow" href="https://github.com/huggingface/smollm">https://github.com/huggingface/smollm</a>. You will find pre-training, post-training, evaluation and local inference code.</p> <h3 class="relative group flex items-center"> <a rel="nofollow" href="#how-to-use" class="block pr-1.5 text-lg md:absolute md:p-1.5 md:opacity-0 md:group-hover:opacity-100 md:right-full" id="how-to-use"> <span class="header-link"><svg viewBox="0 0 256 256" preserveAspectRatio="xMidYMid meet" height="1em" width="1em" role="img" aria-hidden="true" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg" class="text-gray-500 hover:text-black dark:hover:text-gray-200 w-4"><path fill="currentColor" d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z"></path></svg></span> </a> <span> How to use </span> </h3> <h3 class="relative group flex items-center"> <a rel="nofollow" href="#transformers" class="block pr-1.5 text-lg md:absolute md:p-1.5 md:opacity-0 md:group-hover:opacity-100 md:right-full" id="transformers"> <span class="header-link"><svg viewBox="0 0 256 256" preserveAspectRatio="xMidYMid meet" height="1em" width="1em" role="img" aria-hidden="true" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg" class="text-gray-500 hover:text-black dark:hover:text-gray-200 w-4"><path fill="currentColor" d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z"></path></svg></span> </a> <span> Transformers </span> </h3> <pre><code class="language-bash">pip install transformers </code></pre> <pre><code class="language-python"><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoModelForCausalLM, AutoTokenizer checkpoint = <span class="hljs-string">"HuggingFaceTB/SmolLM2-1.7B-Instruct"</span> device = <span class="hljs-string">"cuda"</span> <span class="hljs-comment"># for GPU usage or "cpu" for CPU usage</span> tokenizer = AutoTokenizer.from_pretrained(checkpoint) <span class="hljs-comment"># for multiple GPUs install accelerate and do `model = AutoModelForCausalLM.from_pretrained(checkpoint, device_map="auto")`</span> model = AutoModelForCausalLM.from_pretrained(checkpoint).to(device) messages = [{<span class="hljs-string">"role"</span>: <span class="hljs-string">"user"</span>, <span class="hljs-string">"content"</span>: <span class="hljs-string">"What is the capital of France."</span>}] input_text=tokenizer.apply_chat_template(messages, tokenize=<span class="hljs-literal">False</span>) inputs = tokenizer.encode(input_text, return_tensors=<span class="hljs-string">"pt"</span>).to(device) outputs = model.generate(inputs, max_new_tokens=<span class="hljs-number">50</span>, temperature=<span class="hljs-number">0.2</span>, top_p=<span class="hljs-number">0.9</span>, do_sample=<span class="hljs-literal">True</span>) <span class="hljs-built_in">print</span>(tokenizer.decode(outputs[<span class="hljs-number">0</span>])) </code></pre> <h3 class="relative group flex items-center"> <a rel="nofollow" href="#chat-in-trl" class="block pr-1.5 text-lg md:absolute md:p-1.5 md:opacity-0 md:group-hover:opacity-100 md:right-full" id="chat-in-trl"> <span class="header-link"><svg viewBox="0 0 256 256" preserveAspectRatio="xMidYMid meet" height="1em" width="1em" role="img" aria-hidden="true" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg" class="text-gray-500 hover:text-black dark:hover:text-gray-200 w-4"><path fill="currentColor" d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z"></path></svg></span> </a> <span> Chat in TRL </span> </h3> <p>You can also use the TRL CLI to chat with the model from the terminal:</p> <pre><code class="language-bash">pip install trl trl chat --model_name_or_path HuggingFaceTB/SmolLM2-1.7B-Instruct --device cpu </code></pre> <h2 class="relative group flex items-center"> <a rel="nofollow" href="#evaluation" class="block pr-1.5 text-lg md:absolute md:p-1.5 md:opacity-0 md:group-hover:opacity-100 md:right-full" id="evaluation"> <span class="header-link"><svg viewBox="0 0 256 256" preserveAspectRatio="xMidYMid meet" height="1em" width="1em" role="img" aria-hidden="true" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg" class="text-gray-500 hover:text-black dark:hover:text-gray-200 w-4"><path fill="currentColor" d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z"></path></svg></span> </a> <span> Evaluation </span> </h2> <p>In this section, we report the evaluation results of SmolLM2. All evaluations are zero-shot unless stated otherwise, and we use <a rel="nofollow" href="https://github.com/huggingface/lighteval">lighteval</a> to run them.</p> <h2 class="relative group flex items-center"> <a rel="nofollow" href="#base-pre-trained-model" class="block pr-1.5 text-lg md:absolute md:p-1.5 md:opacity-0 md:group-hover:opacity-100 md:right-full" id="base-pre-trained-model"> <span class="header-link"><svg viewBox="0 0 256 256" preserveAspectRatio="xMidYMid meet" height="1em" width="1em" role="img" aria-hidden="true" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg" class="text-gray-500 hover:text-black dark:hover:text-gray-200 w-4"><path fill="currentColor" d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z"></path></svg></span> </a> <span> Base Pre-Trained Model </span> </h2> <div class="max-w-full overflow-auto"> <table> <thead><tr> <th>Metric</th> <th>SmolLM2-1.7B</th> <th>Llama-1B</th> <th>Qwen2.5-1.5B</th> <th>SmolLM1-1.7B</th> </tr> </thead><tbody><tr> <td>HellaSwag</td> <td><strong>68.7</strong></td> <td>61.2</td> <td>66.4</td> <td>62.9</td> </tr> <tr> <td>ARC (Average)</td> <td><strong>60.5</strong></td> <td>49.2</td> <td>58.5</td> <td>59.9</td> </tr> <tr> <td>PIQA</td> <td><strong>77.6</strong></td> <td>74.8</td> <td>76.1</td> <td>76.0</td> </tr> <tr> <td>MMLU-Pro (MCF)</td> <td><strong>19.4</strong></td> <td>11.7</td> <td>13.7</td> <td>10.8</td> </tr> <tr> <td>CommonsenseQA</td> <td><strong>43.6</strong></td> <td>41.2</td> <td>34.1</td> <td>38.0</td> </tr> <tr> <td>TriviaQA</td> <td><strong>36.7</strong></td> <td>28.1</td> <td>20.9</td> <td>22.5</td> </tr> <tr> <td>Winogrande</td> <td><strong>59.4</strong></td> <td>57.8</td> <td>59.3</td> <td>54.7</td> </tr> <tr> <td>OpenBookQA</td> <td>42.2</td> <td>38.4</td> <td>40.0</td> <td><strong>42.4</strong></td> </tr> <tr> <td>GSM8K (5-shot)</td> <td>31.0</td> <td>7.2</td> <td><strong>61.3</strong></td> <td>5.5</td> </tr> </tbody> </table> </div> <h2 class="relative group flex items-center"> <a rel="nofollow" href="#instruction-model" class="block pr-1.5 text-lg md:absolute md:p-1.5 md:opacity-0 md:group-hover:opacity-100 md:right-full" id="instruction-model"> <span class="header-link"><svg viewBox="0 0 256 256" preserveAspectRatio="xMidYMid meet" height="1em" width="1em" role="img" aria-hidden="true" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg" class="text-gray-500 hover:text-black dark:hover:text-gray-200 w-4"><path fill="currentColor" d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z"></path></svg></span> </a> <span> Instruction Model </span> </h2> <div class="max-w-full overflow-auto"> <table> <thead><tr> <th align="left">Metric</th> <th align="center">SmolLM2-1.7B-Instruct</th> <th align="center">Llama-1B-Instruct</th> <th align="center">Qwen2.5-1.5B-Instruct</th> <th align="center">SmolLM1-1.7B-Instruct</th> </tr> </thead><tbody><tr> <td align="left">IFEval (Average prompt/inst)</td> <td align="center"><strong>56.7</strong></td> <td align="center">53.5</td> <td align="center">47.4</td> <td align="center">23.1</td> </tr> <tr> <td align="left">MT-Bench</td> <td align="center">6.13</td> <td align="center">5.48</td> <td align="center"><strong>6.52</strong></td> <td align="center">4.33</td> </tr> <tr> <td align="left">OpenRewrite-Eval (micro_avg RougeL)</td> <td align="center">44.9</td> <td align="center">39.2</td> <td align="center"><strong>46.9</strong></td> <td align="center">NaN</td> </tr> <tr> <td align="left">HellaSwag</td> <td align="center"><strong>66.1</strong></td> <td align="center">56.1</td> <td align="center">60.9</td> <td align="center">55.5</td> </tr> <tr> <td align="left">ARC (Average)</td> <td align="center"><strong>51.7</strong></td> <td align="center">41.6</td> <td align="center">46.2</td> <td align="center">43.7</td> </tr> <tr> <td align="left">PIQA</td> <td align="center"><strong>74.4</strong></td> <td align="center">72.3</td> <td align="center">73.2</td> <td align="center">71.6</td> </tr> <tr> <td align="left">MMLU-Pro (MCF)</td> <td align="center">19.3</td> <td align="center">12.7</td> <td align="center"><strong>24.2</strong></td> <td align="center">11.7</td> </tr> <tr> <td align="left">BBH (3-shot)</td> <td align="center">32.2</td> <td align="center">27.6</td> <td align="center"><strong>35.3</strong></td> <td align="center">25.7</td> </tr> <tr> <td align="left">GSM8K (5-shot)</td> <td align="center"><strong>48.2</strong></td> <td align="center">26.8</td> <td align="center">42.8</td> <td align="center">4.62</td> </tr> </tbody> </table> </div> <h2 class="relative group flex items-center"> <a rel="nofollow" href="#examples" class="block pr-1.5 text-lg md:absolute md:p-1.5 md:opacity-0 md:group-hover:opacity-100 md:right-full" id="examples"> <span class="header-link"><svg viewBox="0 0 256 256" preserveAspectRatio="xMidYMid meet" height="1em" width="1em" role="img" aria-hidden="true" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg" class="text-gray-500 hover:text-black dark:hover:text-gray-200 w-4"><path fill="currentColor" d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z"></path></svg></span> </a> <span> Examples </span> </h2> <p>Below are some system and instruct prompts that work well for special tasks</p> <h3 class="relative group flex items-center"> <a rel="nofollow" href="#text-rewriting" class="block pr-1.5 text-lg md:absolute md:p-1.5 md:opacity-0 md:group-hover:opacity-100 md:right-full" id="text-rewriting"> <span class="header-link"><svg viewBox="0 0 256 256" preserveAspectRatio="xMidYMid meet" height="1em" width="1em" role="img" aria-hidden="true" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg" class="text-gray-500 hover:text-black dark:hover:text-gray-200 w-4"><path fill="currentColor" d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z"></path></svg></span> </a> <span> Text rewriting </span> </h3> <pre><code class="language-python">system_prompt_rewrite = <span class="hljs-string">"You are an AI writing assistant. Your task is to rewrite the user's email to make it more professional and approachable while maintaining its main points and key message. Do not return any text other than the rewritten message."</span> user_prompt_rewrite = <span class="hljs-string">"Rewrite the message below to make it more friendly and approachable while maintaining its main points and key message. Do not add any new information or return any text other than the rewritten message\nThe message:"</span> messages = [{<span class="hljs-string">"role"</span>: <span class="hljs-string">"system"</span>, <span class="hljs-string">"content"</span>: system_prompt_rewrite}, {<span class="hljs-string">"role"</span>: <span class="hljs-string">"user"</span>, <span class="hljs-string">"content"</span>:<span class="hljs-string">f"<span class="hljs-subst">{user_prompt_rewrite}</span> The CI is failing after your last commit!"</span>}] input_text=tokenizer.apply_chat_template(messages, tokenize=<span class="hljs-literal">False</span>) inputs = tokenizer.encode(input_text, return_tensors=<span class="hljs-string">"pt"</span>).to(device) outputs = model.generate(inputs, max_new_tokens=<span class="hljs-number">50</span>, temperature=<span class="hljs-number">0.2</span>, top_p=<span class="hljs-number">0.9</span>, do_sample=<span class="hljs-literal">True</span>) <span class="hljs-built_in">print</span>(tokenizer.decode(outputs[<span class="hljs-number">0</span>])) </code></pre> <pre><code>Hey there! I noticed that the CI isn't passing after your latest commit. Could you take a look and let me know what's going on? Thanks so much for your help! </code></pre> <h3 class="relative group flex items-center"> <a rel="nofollow" href="#summarization" class="block pr-1.5 text-lg md:absolute md:p-1.5 md:opacity-0 md:group-hover:opacity-100 md:right-full" id="summarization"> <span class="header-link"><svg viewBox="0 0 256 256" preserveAspectRatio="xMidYMid meet" height="1em" width="1em" role="img" aria-hidden="true" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg" class="text-gray-500 hover:text-black dark:hover:text-gray-200 w-4"><path fill="currentColor" d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z"></path></svg></span> </a> <span> Summarization </span> </h3> <pre><code class="language-python">system_prompt_summarize = <span class="hljs-string">"Provide a concise, objective summary of the input text in up to three sentences, focusing on key actions and intentions without using second or third person pronouns."</span> messages = [{<span class="hljs-string">"role"</span>: <span class="hljs-string">"system"</span>, <span class="hljs-string">"content"</span>: system_prompt_summarize}, {<span class="hljs-string">"role"</span>: <span class="hljs-string">"user"</span>, <span class="hljs-string">"content"</span>: INSERT_LONG_EMAIL}] input_text=tokenizer.apply_chat_template(messages, tokenize=<span class="hljs-literal">False</span>) inputs = tokenizer.encode(input_text, return_tensors=<span class="hljs-string">"pt"</span>).to(device) outputs = model.generate(inputs, max_new_tokens=<span class="hljs-number">50</span>, temperature=<span class="hljs-number">0.2</span>, top_p=<span class="hljs-number">0.9</span>, do_sample=<span class="hljs-literal">True</span>) <span class="hljs-built_in">print</span>(tokenizer.decode(outputs[<span class="hljs-number">0</span>])) </code></pre> <h3 class="relative group flex items-center"> <a rel="nofollow" href="#function-calling" class="block pr-1.5 text-lg md:absolute md:p-1.5 md:opacity-0 md:group-hover:opacity-100 md:right-full" id="function-calling"> <span class="header-link"><svg viewBox="0 0 256 256" preserveAspectRatio="xMidYMid meet" height="1em" width="1em" role="img" aria-hidden="true" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg" class="text-gray-500 hover:text-black dark:hover:text-gray-200 w-4"><path fill="currentColor" d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z"></path></svg></span> </a> <span> Function calling </span> </h3> <p>SmolLM2-1.7B-Instruct can handle function calling, it scores 27% on the <a rel="nofollow" href="https://gorilla.cs.berkeley.edu/blogs/8_berkeley_function_calling_leaderboard.html">BFCL Leaderboard</a>. Here's how you can leverage it:</p> <pre><code class="language-python"><span class="hljs-keyword">import</span> json <span class="hljs-keyword">import</span> re <span class="hljs-keyword">from</span> typing <span class="hljs-keyword">import</span> <span class="hljs-type">Optional</span> <span class="hljs-keyword">from</span> jinja2 <span class="hljs-keyword">import</span> Template <span class="hljs-keyword">import</span> torch <span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoModelForCausalLM, AutoTokenizer <span class="hljs-keyword">from</span> transformers.utils <span class="hljs-keyword">import</span> get_json_schema system_prompt = Template(<span class="hljs-string">"""You are an expert in composing functions. You are given a question and a set of possible functions. </span> <span class="hljs-string">Based on the question, you will need to make one or more function/tool calls to achieve the purpose. </span> <span class="hljs-string">If none of the functions can be used, point it out and refuse to answer. </span> <span class="hljs-string">If the given question lacks the parameters required by the function, also point it out.</span> <span class="hljs-string"></span> <span class="hljs-string">You have access to the following tools:</span> <span class="hljs-string"><tools>{{ tools }}</tools></span> <span class="hljs-string"></span> <span class="hljs-string">The output MUST strictly adhere to the following format, and NO other text MUST be included.</span> <span class="hljs-string">The example format is as follows. Please make sure the parameter type is correct. If no function call is needed, please make the tool calls an empty list '[]'.</span> <span class="hljs-string"><tool_call>[</span> <span class="hljs-string">{"name": "func_name1", "arguments": {"argument1": "value1", "argument2": "value2"}},</span> <span class="hljs-string"><span class="hljs-meta">... </span>(more tool calls as required)</span> <span class="hljs-string">]</tool_call>"""</span>) <span class="hljs-keyword">def</span> <span class="hljs-title function_">prepare_messages</span>(<span class="hljs-params"></span> <span class="hljs-params"> query: <span class="hljs-built_in">str</span>,</span> <span class="hljs-params"> tools: <span class="hljs-type">Optional</span>[<span class="hljs-built_in">dict</span>[<span class="hljs-built_in">str</span>, <span class="hljs-built_in">any</span>]] = <span class="hljs-literal">None</span>,</span> <span class="hljs-params"> history: <span class="hljs-type">Optional</span>[<span class="hljs-built_in">list</span>[<span class="hljs-built_in">dict</span>[<span class="hljs-built_in">str</span>, <span class="hljs-built_in">str</span>]]] = <span class="hljs-literal">None</span></span> <span class="hljs-params"></span>) -> <span class="hljs-built_in">list</span>[<span class="hljs-built_in">dict</span>[<span class="hljs-built_in">str</span>, <span class="hljs-built_in">str</span>]]: <span class="hljs-string">"""Prepare the system and user messages for the given query and tools.</span> <span class="hljs-string"> </span> <span class="hljs-string"> Args:</span> <span class="hljs-string"> query: The query to be answered.</span> <span class="hljs-string"> tools: The tools available to the user. Defaults to None, in which case if a</span> <span class="hljs-string"> list without content will be passed to the model.</span> <span class="hljs-string"> history: Exchange of messages, including the system_prompt from</span> <span class="hljs-string"> the first query. Defaults to None, the first message in a conversation.</span> <span class="hljs-string"> """</span> <span class="hljs-keyword">if</span> tools <span class="hljs-keyword">is</span> <span class="hljs-literal">None</span>: tools = [] <span class="hljs-keyword">if</span> history: messages = history.copy() messages.append({<span class="hljs-string">"role"</span>: <span class="hljs-string">"user"</span>, <span class="hljs-string">"content"</span>: query}) <span class="hljs-keyword">else</span>: messages = [ {<span class="hljs-string">"role"</span>: <span class="hljs-string">"system"</span>, <span class="hljs-string">"content"</span>: system_prompt.render(tools=json.dumps(tools))}, {<span class="hljs-string">"role"</span>: <span class="hljs-string">"user"</span>, <span class="hljs-string">"content"</span>: query} ] <span class="hljs-keyword">return</span> messages <span class="hljs-keyword">def</span> <span class="hljs-title function_">parse_response</span>(<span class="hljs-params">text: <span class="hljs-built_in">str</span></span>) -> <span class="hljs-built_in">str</span> | <span class="hljs-built_in">dict</span>[<span class="hljs-built_in">str</span>, <span class="hljs-built_in">any</span>]: <span class="hljs-string">"""Parses a response from the model, returning either the</span> <span class="hljs-string"> parsed list with the tool calls parsed, or the</span> <span class="hljs-string"> model thought or response if couldn't generate one.</span> <span class="hljs-string"></span> <span class="hljs-string"> Args:</span> <span class="hljs-string"> text: Response from the model.</span> <span class="hljs-string"> """</span> pattern = <span class="hljs-string">r"<tool_call>(.*?)</tool_call>"</span> matches = re.findall(pattern, text, re.DOTALL) <span class="hljs-keyword">if</span> matches: <span class="hljs-keyword">return</span> json.loads(matches[<span class="hljs-number">0</span>]) <span class="hljs-keyword">return</span> text model_name_smollm = <span class="hljs-string">"HuggingFaceTB/SmolLM2-1.7B-Instruct"</span> model = AutoModelForCausalLM.from_pretrained(model_name_smollm, device_map=<span class="hljs-string">"auto"</span>, torch_dtype=<span class="hljs-string">"auto"</span>, trust_remote_code=<span class="hljs-literal">True</span>) tokenizer = AutoTokenizer.from_pretrained(model_name_smollm) <span class="hljs-keyword">from</span> datetime <span class="hljs-keyword">import</span> datetime <span class="hljs-keyword">import</span> random <span class="hljs-keyword">def</span> <span class="hljs-title function_">get_current_time</span>() -> <span class="hljs-built_in">str</span>: <span class="hljs-string">"""Returns the current time in 24-hour format.</span> <span class="hljs-string"></span> <span class="hljs-string"> Returns:</span> <span class="hljs-string"> str: Current time in HH:MM:SS format.</span> <span class="hljs-string"> """</span> <span class="hljs-keyword">return</span> datetime.now().strftime(<span class="hljs-string">"%H:%M:%S"</span>) <span class="hljs-keyword">def</span> <span class="hljs-title function_">get_random_number_between</span>(<span class="hljs-params"><span class="hljs-built_in">min</span>: <span class="hljs-built_in">int</span>, <span class="hljs-built_in">max</span>: <span class="hljs-built_in">int</span></span>) -> <span class="hljs-built_in">int</span>: <span class="hljs-string">"""</span> <span class="hljs-string"> Gets a random number between min and max.</span> <span class="hljs-string"></span> <span class="hljs-string"> Args:</span> <span class="hljs-string"> min: The minimum number.</span> <span class="hljs-string"> max: The maximum number.</span> <span class="hljs-string"></span> <span class="hljs-string"> Returns:</span> <span class="hljs-string"> A random number between min and max.</span> <span class="hljs-string"> """</span> <span class="hljs-keyword">return</span> random.randint(<span class="hljs-built_in">min</span>, <span class="hljs-built_in">max</span>) tools = [get_json_schema(get_random_number_between), get_json_schema(get_current_time)] toolbox = {<span class="hljs-string">"get_random_number_between"</span>: get_random_number_between, <span class="hljs-string">"get_current_time"</span>: get_current_time} query = <span class="hljs-string">"Give me a number between 1 and 300"</span> messages = prepare_messages(query, tools=tools) inputs = tokenizer.apply_chat_template(messages, add_generation_prompt=<span class="hljs-literal">True</span>, return_tensors=<span class="hljs-string">"pt"</span>).to(model.device) outputs = model.generate(inputs, max_new_tokens=<span class="hljs-number">512</span>, do_sample=<span class="hljs-literal">False</span>, num_return_sequences=<span class="hljs-number">1</span>, eos_token_id=tokenizer.eos_token_id) result = tokenizer.decode(outputs[<span class="hljs-number">0</span>][<span class="hljs-built_in">len</span>(inputs[<span class="hljs-number">0</span>]):], skip_special_tokens=<span class="hljs-literal">True</span>) tool_calls = parse_response(result) <span class="hljs-comment"># [{'name': 'get_random_number_between', 'arguments': {'min': 1, 'max': 300}}</span> <span class="hljs-comment"># Get tool responses</span> tool_responses = [toolbox.get(tc[<span class="hljs-string">"name"</span>])(*tc[<span class="hljs-string">"arguments"</span>].values()) <span class="hljs-keyword">for</span> tc <span class="hljs-keyword">in</span> tool_calls] <span class="hljs-comment"># [63]</span> <span class="hljs-comment"># For the second turn, rebuild the history of messages:</span> history = messages.copy() <span class="hljs-comment"># Add the "parsed response"</span> history.append({<span class="hljs-string">"role"</span>: <span class="hljs-string">"assistant"</span>, <span class="hljs-string">"content"</span>: result}) query = <span class="hljs-string">"Can you give me the hour?"</span> history.append({<span class="hljs-string">"role"</span>: <span class="hljs-string">"user"</span>, <span class="hljs-string">"content"</span>: query}) inputs = tokenizer.apply_chat_template(history, add_generation_prompt=<span class="hljs-literal">True</span>, return_tensors=<span class="hljs-string">"pt"</span>).to(model.device) outputs = model.generate(inputs, max_new_tokens=<span class="hljs-number">512</span>, do_sample=<span class="hljs-literal">False</span>, num_return_sequences=<span class="hljs-number">1</span>, eos_token_id=tokenizer.eos_token_id) result = tokenizer.decode(outputs[<span class="hljs-number">0</span>][<span class="hljs-built_in">len</span>(inputs[<span class="hljs-number">0</span>]):], skip_special_tokens=<span class="hljs-literal">True</span>) tool_calls = parse_response(result) tool_responses = [toolbox.get(tc[<span class="hljs-string">"name"</span>])(*tc[<span class="hljs-string">"arguments"</span>].values()) <span class="hljs-keyword">for</span> tc <span class="hljs-keyword">in</span> tool_calls] <span class="hljs-comment"># ['07:57:25']</span> </code></pre> <p>More details such as parallel function calls and tools not available can be found <a rel="nofollow" href="https://huggingface.co/HuggingFaceTB/SmolLM2-1.7B-Instruct/blob/main/instructions_function_calling.md">here</a></p> <h2 class="relative group flex items-center"> <a rel="nofollow" href="#limitations" class="block pr-1.5 text-lg md:absolute md:p-1.5 md:opacity-0 md:group-hover:opacity-100 md:right-full" id="limitations"> <span class="header-link"><svg viewBox="0 0 256 256" preserveAspectRatio="xMidYMid meet" height="1em" width="1em" role="img" aria-hidden="true" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg" class="text-gray-500 hover:text-black dark:hover:text-gray-200 w-4"><path fill="currentColor" d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z"></path></svg></span> </a> <span> Limitations </span> </h2> <p>SmolLM2 models primarily understand and generate content in English. They can produce text on a variety of topics, but the generated content may not always be factually accurate, logically consistent, or free from biases present in the training data. These models should be used as assistive tools rather than definitive sources of information. Users should always verify important information and critically evaluate any generated content.</p> <h2 class="relative group flex items-center"> <a rel="nofollow" href="#training" class="block pr-1.5 text-lg md:absolute md:p-1.5 md:opacity-0 md:group-hover:opacity-100 md:right-full" id="training"> <span class="header-link"><svg viewBox="0 0 256 256" preserveAspectRatio="xMidYMid meet" height="1em" width="1em" role="img" aria-hidden="true" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg" class="text-gray-500 hover:text-black dark:hover:text-gray-200 w-4"><path fill="currentColor" d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z"></path></svg></span> </a> <span> Training </span> </h2> <h3 class="relative group flex items-center"> <a rel="nofollow" href="#model" class="block pr-1.5 text-lg md:absolute md:p-1.5 md:opacity-0 md:group-hover:opacity-100 md:right-full" id="model"> <span class="header-link"><svg viewBox="0 0 256 256" preserveAspectRatio="xMidYMid meet" height="1em" width="1em" role="img" aria-hidden="true" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg" class="text-gray-500 hover:text-black dark:hover:text-gray-200 w-4"><path fill="currentColor" d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z"></path></svg></span> </a> <span> Model </span> </h3> <ul> <li><strong>Architecture:</strong> Transformer decoder</li> <li><strong>Pretraining tokens:</strong> 11T</li> <li><strong>Precision:</strong> bfloat16</li> </ul> <h3 class="relative group flex items-center"> <a rel="nofollow" href="#hardware" class="block pr-1.5 text-lg md:absolute md:p-1.5 md:opacity-0 md:group-hover:opacity-100 md:right-full" id="hardware"> <span class="header-link"><svg viewBox="0 0 256 256" preserveAspectRatio="xMidYMid meet" height="1em" width="1em" role="img" aria-hidden="true" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg" class="text-gray-500 hover:text-black dark:hover:text-gray-200 w-4"><path fill="currentColor" d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z"></path></svg></span> </a> <span> Hardware </span> </h3> <ul> <li><strong>GPUs:</strong> 256 H100</li> </ul> <h3 class="relative group flex items-center"> <a rel="nofollow" href="#software" class="block pr-1.5 text-lg md:absolute md:p-1.5 md:opacity-0 md:group-hover:opacity-100 md:right-full" id="software"> <span class="header-link"><svg viewBox="0 0 256 256" preserveAspectRatio="xMidYMid meet" height="1em" width="1em" role="img" aria-hidden="true" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg" class="text-gray-500 hover:text-black dark:hover:text-gray-200 w-4"><path fill="currentColor" d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z"></path></svg></span> </a> <span> Software </span> </h3> <ul> <li><strong>Training Framework:</strong> <a rel="nofollow" href="https://github.com/huggingface/nanotron/tree/main">nanotron</a></li> <li><strong>Alignement Handbook</strong> <a rel="nofollow" href="https://github.com/huggingface/alignment-handbook/">alignement-handbook</a></li> </ul> <h2 class="relative group flex items-center"> <a rel="nofollow" href="#license" class="block pr-1.5 text-lg md:absolute md:p-1.5 md:opacity-0 md:group-hover:opacity-100 md:right-full" id="license"> <span class="header-link"><svg viewBox="0 0 256 256" preserveAspectRatio="xMidYMid meet" height="1em" width="1em" role="img" aria-hidden="true" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg" class="text-gray-500 hover:text-black dark:hover:text-gray-200 w-4"><path fill="currentColor" d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z"></path></svg></span> </a> <span> License </span> </h2> <p><a rel="nofollow" href="https://www.apache.org/licenses/LICENSE-2.0">Apache 2.0</a></p> <h2 class="relative group flex items-center"> <a rel="nofollow" href="#citation" class="block pr-1.5 text-lg md:absolute md:p-1.5 md:opacity-0 md:group-hover:opacity-100 md:right-full" id="citation"> <span class="header-link"><svg viewBox="0 0 256 256" preserveAspectRatio="xMidYMid meet" height="1em" width="1em" role="img" aria-hidden="true" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg" class="text-gray-500 hover:text-black dark:hover:text-gray-200 w-4"><path fill="currentColor" d="M167.594 88.393a8.001 8.001 0 0 1 0 11.314l-67.882 67.882a8 8 0 1 1-11.314-11.315l67.882-67.881a8.003 8.003 0 0 1 11.314 0zm-28.287 84.86l-28.284 28.284a40 40 0 0 1-56.567-56.567l28.284-28.284a8 8 0 0 0-11.315-11.315l-28.284 28.284a56 56 0 0 0 79.196 79.197l28.285-28.285a8 8 0 1 0-11.315-11.314zM212.852 43.14a56.002 56.002 0 0 0-79.196 0l-28.284 28.284a8 8 0 1 0 11.314 11.314l28.284-28.284a40 40 0 0 1 56.568 56.567l-28.285 28.285a8 8 0 0 0 11.315 11.314l28.284-28.284a56.065 56.065 0 0 0 0-79.196z"></path></svg></span> </a> <span> Citation </span> </h2> <pre><code class="language-bash">@misc{allal2024SmolLM2, title={SmolLM2 - with great data, comes great performance}, author={Loubna Ben Allal and Anton Lozhkov and Elie Bakouch and Gabriel Martín Blázquez and Lewis Tunstall and Agustín Piqueres and Andres Marafioti and Cyril Zakka and Leandro von Werra and Thomas Wolf}, year={2024}, } </code></pre> <!-- HTML_TAG_END --></div> </div></section> <section class="pt-8 border-gray-100 md:col-span-5 pt-6 md:pb-24 md:pl-6 md:border-l order-first md:order-none"><div class="flex justify-between pb-2"><dl><dt class="-mb-1 text-sm text-gray-500">Downloads last month</dt><dd class="font-semibold">82,250 </dd></dl> <div class="model-graph h-[40px] w-[200px] flex-none md:w-[150px] lg:w-[200px]"><!-- HTML_TAG_START --> <svg viewbox="0 0 100 100" width="100%" height="100%" preserveAspectRatio="none" style="overflow: visible;" > <defs> <linearGradient id="fill-gradient" x1="0%" y1="0%" x2="0%" y2="100%"> <stop offset="0%" style="stop-color: rgb(137, 86, 255); stop-opacity:0.3" /> <stop offset="100%" style="stop-color: rgb(137, 86, 255); stop-opacity:0.05" /> </linearGradient> </defs> <path d="M 0,100C 0.2,100 3.1,100.4 3.4,100C 3.7,99.6 6.6,93.3 6.9,91.9C 7.2,90.5 10,73.8 10.3,72.6C 10.6,71.4 13.5,69.8 13.8,68.9C 14.1,68 16.9,55.4 17.2,54.1C 17.5,52.8 20.4,43.1 20.7,42.2C 21,41.3 23.8,34.7 24.1,35.4C 24.4,36.1 27.3,55.3 27.6,55.6C 27.9,55.9 30.7,43.8 31,41C 31.3,38.2 34.2,1.7 34.5,0C 34.8,-1.7 37.9,6.8 37.9,6.8C 37.9,6.8 41.1,11.2 41.4,13.6C 41.7,16 44.5,53.4 44.8,55.4C 45.1,57.4 48,54.2 48.3,53.4C 48.6,52.6 51.4,40.8 51.7,40C 52,39.2 54.9,36.7 55.2,38.2C 55.5,39.7 58.3,68.1 58.6,70.2C 58.9,72.3 61.8,79.8 62.1,79.4C 62.4,79 65.2,64.2 65.5,62.8C 65.8,61.4 68.7,51.5 69,51.8C 69.3,52.1 72.1,67.1 72.4,67.9C 72.7,68.7 75.6,68.3 75.9,68.2C 76.2,68.1 79,64.8 79.3,65C 79.6,65.2 82.5,71.9 82.8,72.9C 83.1,73.9 85.9,84.9 86.2,85.3C 86.5,85.7 89.4,81 89.7,80.4C 90,79.8 92.8,73.8 93.1,73.2C 93.4,72.6 96.3,67.7 96.6,68.5C 96.9,69.3 99.8,88.3 100,89.3" fill="none" stroke="rgb(137, 86, 255)" stroke-width="3" vector-effect="non-scaling-stroke" /> <path d="M 0,100 L 0,100C 0.2,100 3.1,100.4 3.4,100C 3.7,99.6 6.6,93.3 6.9,91.9C 7.2,90.5 10,73.8 10.3,72.6C 10.6,71.4 13.5,69.8 13.8,68.9C 14.1,68 16.9,55.4 17.2,54.1C 17.5,52.8 20.4,43.1 20.7,42.2C 21,41.3 23.8,34.7 24.1,35.4C 24.4,36.1 27.3,55.3 27.6,55.6C 27.9,55.9 30.7,43.8 31,41C 31.3,38.2 34.2,1.7 34.5,0C 34.8,-1.7 37.9,6.8 37.9,6.8C 37.9,6.8 41.1,11.2 41.4,13.6C 41.7,16 44.5,53.4 44.8,55.4C 45.1,57.4 48,54.2 48.3,53.4C 48.6,52.6 51.4,40.8 51.7,40C 52,39.2 54.9,36.7 55.2,38.2C 55.5,39.7 58.3,68.1 58.6,70.2C 58.9,72.3 61.8,79.8 62.1,79.4C 62.4,79 65.2,64.2 65.5,62.8C 65.8,61.4 68.7,51.5 69,51.8C 69.3,52.1 72.1,67.1 72.4,67.9C 72.7,68.7 75.6,68.3 75.9,68.2C 76.2,68.1 79,64.8 79.3,65C 79.6,65.2 82.5,71.9 82.8,72.9C 83.1,73.9 85.9,84.9 86.2,85.3C 86.5,85.7 89.4,81 89.7,80.4C 90,79.8 92.8,73.8 93.1,73.2C 93.4,72.6 96.3,67.7 96.6,68.5C 96.9,69.3 99.8,88.3 100,89.3 L 100,100" fill="url(#fill-gradient)" stroke="none" vector-effect="non-scaling-stroke" /> </svg> <!-- HTML_TAG_END --></div></div> <div class="divider-column-vertical"></div> <div class="SVELTE_HYDRATER contents" data-target="ModelTensorsParams" data-props="{"modelId":"HuggingFaceTB/SmolLM2-1.7B-Instruct","safetensors":{"parameters":{"BF16":1711376384},"total":1711376384,"sharded":false},"isGated":false,"query":{},"model":{"author":"HuggingFaceTB","cardData":{"library_name":"transformers","license":"apache-2.0","language":["en"],"pipeline_tag":"text-generation","tags":["safetensors","onnx","transformers.js"],"base_model":["HuggingFaceTB/SmolLM2-1.7B"]},"cardExists":true,"config":{"architectures":["LlamaForCausalLM"],"model_type":"llama","tokenizer_config":{"bos_token":"<|im_start|>","chat_template":"{% for message in messages %}{% if loop.first and messages[0]['role'] != 'system' %}{{ '<|im_start|>system\nYou are a helpful AI assistant named SmolLM, trained by Hugging Face<|im_end|>\n' }}{% endif %}{{'<|im_start|>' + message['role'] + '\n' + message['content'] + '<|im_end|>' + '\n'}}{% endfor %}{% if add_generation_prompt %}{{ '<|im_start|>assistant\n' }}{% endif %}","eos_token":"<|im_end|>","pad_token":"<|im_end|>","unk_token":"<|endoftext|>"}},"createdAt":"2024-10-31T13:42:06.000Z","discussionsDisabled":false,"downloads":82250,"downloadsAllTime":82250,"id":"HuggingFaceTB/SmolLM2-1.7B-Instruct","isLikedByUser":false,"inference":"cold","lastModified":"2024-11-26T16:00:38.000Z","likes":381,"pipeline_tag":"text-generation","library_name":"transformers","librariesOther":["transformers.js"],"trackDownloads":true,"model-index":null,"private":false,"repoType":"model","gated":false,"pwcLink":{"error":"Unknown error, can't generate link to Papers With Code."},"tags":["transformers","tensorboard","onnx","safetensors","llama","text-generation","transformers.js","conversational","en","base_model:HuggingFaceTB/SmolLM2-1.7B","base_model:quantized:HuggingFaceTB/SmolLM2-1.7B","license:apache-2.0","autotrain_compatible","text-generation-inference","endpoints_compatible","region:us"],"tag_objs":[{"id":"text-generation","label":"Text Generation","type":"pipeline_tag","subType":"nlp"},{"id":"transformers","label":"Transformers","type":"library"},{"id":"tensorboard","label":"TensorBoard","type":"library"},{"id":"onnx","label":"ONNX","type":"library"},{"id":"safetensors","label":"Safetensors","type":"library"},{"id":"transformers.js","label":"Transformers.js","type":"library"},{"id":"en","label":"English","type":"language"},{"id":"llama","label":"llama","type":"other"},{"id":"conversational","label":"conversational","type":"other"},{"id":"base_model:HuggingFaceTB/SmolLM2-1.7B","label":"base_model:HuggingFaceTB/SmolLM2-1.7B","type":"other"},{"id":"base_model:quantized:HuggingFaceTB/SmolLM2-1.7B","label":"base_model:quantized:HuggingFaceTB/SmolLM2-1.7B","type":"other"},{"id":"autotrain_compatible","label":"AutoTrain Compatible","type":"other"},{"id":"text-generation-inference","label":"text-generation-inference","type":"other"},{"id":"endpoints_compatible","label":"Inference Endpoints","type":"other"},{"id":"license:apache-2.0","label":"apache-2.0","type":"license"},{"type":"region","label":"🇺🇸 Region: US","id":"region:us"}],"transformersInfo":{"auto_model":"AutoModelForCausalLM","pipeline_tag":"text-generation","processor":"AutoTokenizer"},"widgetData":[{"text":"Hey my name is Julien! How are you?"},{"text":"Hey my name is Thomas! How are you?"},{"text":"Hey my name is Mariama! How are you?"},{"text":"Hey my name is Clara! How are you?"},{"text":"Hey my name is Julien! How are you?"},{"text":"Hi."}],"safetensors":{"parameters":{"BF16":1711376384},"total":1711376384,"sharded":false},"hasBlockedOids":false}}"><div class="flex gap-1.5 flex-wrap"><div class="mr-auto flex flex-none items-center gap-1 overflow-hidden rounded-lg text-smd font-semibold"><svg class="" viewBox="0 0 57 44" fill="none" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet"><path d="M36.816 20.1474L54.9918 27.4409C55.5142 27.6506 55.9623 28.0112 56.2788 28.4766C56.5954 28.9421 56.7661 29.4913 56.7691 30.0542C56.7722 30.6171 56.6074 31.1682 56.2959 31.637C55.9844 32.1059 55.5402 32.4713 55.0201 32.6866L29.953 43.0646C29.2593 43.3518 28.4799 43.3518 27.7862 43.0646L2.71624 32.6894C2.19613 32.4741 1.75197 32.1087 1.44044 31.6398C1.12892 31.171 0.964165 30.62 0.967204 30.057C0.970244 29.4941 1.14094 28.9449 1.45751 28.4794C1.77408 28.014 2.22216 27.6534 2.74456 27.4437L21.2404 20.0227C22.2997 19.5979 25.6477 20.8441 28.8682 20.8555C32.3096 20.8668 35.6292 19.6715 36.816 20.1474ZM11.3042 30.1119L28.8682 37.3828L46.435 30.1119L28.8682 23.0619L11.3042 30.1119ZM29.9247 0.388251L54.9918 10.4462C55.5142 10.6559 55.9623 11.0165 56.2788 11.482C56.5954 11.9474 56.7661 12.4967 56.7691 13.0596C56.7722 13.6225 56.6074 14.1735 56.2959 14.6424C55.9844 15.1112 55.5402 15.4766 55.0201 15.6919L29.953 26.07C29.2593 26.3572 28.4799 26.3572 27.7862 26.07L2.71624 15.6948C2.19613 15.4795 1.75197 15.1141 1.44044 14.6452C1.12892 14.1763 0.964165 13.6253 0.967204 13.0624C0.970244 12.4995 1.14094 11.9503 1.45751 11.4848C1.77408 11.0193 2.22216 10.6588 2.74456 10.4491L27.8117 0.388251C28.4896 0.1157 29.2467 0.1157 29.9247 0.388251ZM11.3042 13.1172L28.8682 20.3881L46.435 13.1172L28.8682 6.06729L11.3042 13.1172Z" fill="currentColor"></path></svg>Safetensors<a target="_blank" href="https://huggingface.co/docs/safetensors" class="flex-none text-xs text-gray-400 hover:text-gray-500"><svg class="" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M17 22v-8h-4v2h2v6h-3v2h8v-2h-3z" fill="currentColor"></path><path d="M16 8a1.5 1.5 0 1 0 1.5 1.5A1.5 1.5 0 0 0 16 8z" fill="currentColor"></path><path d="M16 30a14 14 0 1 1 14-14a14 14 0 0 1-14 14zm0-26a12 12 0 1 0 12 12A12 12 0 0 0 16 4z" fill="currentColor"></path></svg></a></div> <div class="flex flex-wrap gap-x-1.5 gap-y-1 text-sm"><div class="inline-flex h-6 shrink-0 items-center overflow-hidden rounded-lg border"><div class="border-r px-2 text-gray-500">Model size</div> <div class="px-1.5">1.71B params</div></div> <div class="inline-flex h-6 shrink-0 items-center overflow-hidden rounded-lg border"><div class="border-r px-2 text-gray-500">Tensor type</div> <div class="flex px-1.5">BF16 <div class="mx-1 text-gray-400 last:hidden">·</div></div></div> <button class="from-gray-50-to-white inline-flex h-6 w-6 items-center justify-center overflow-hidden rounded-lg border bg-gradient-to-t hover:shadow-inner dark:hover:brightness-125" title="" ><svg class="text-xs" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32" fill="currentColor"><path fill="currentColor" d="M10 6v2h12.59L6 24.59L7.41 26L24 9.41V22h2V6H10z"></path></svg></button></div></div> </div> <div class="divider-column-vertical"></div> <div class="bg-white pb-1"><div class="SVELTE_HYDRATER contents" data-target="InferenceWidget" data-props="{"apiUrl":"https://api-inference.huggingface.co","model":{"author":"HuggingFaceTB","cardData":{"library_name":"transformers","license":"apache-2.0","language":["en"],"pipeline_tag":"text-generation","tags":["safetensors","onnx","transformers.js"],"base_model":["HuggingFaceTB/SmolLM2-1.7B"]},"cardExists":true,"config":{"architectures":["LlamaForCausalLM"],"model_type":"llama","tokenizer_config":{"bos_token":"<|im_start|>","chat_template":"{% for message in messages %}{% if loop.first and messages[0]['role'] != 'system' %}{{ '<|im_start|>system\nYou are a helpful AI assistant named SmolLM, trained by Hugging Face<|im_end|>\n' }}{% endif %}{{'<|im_start|>' + message['role'] + '\n' + message['content'] + '<|im_end|>' + '\n'}}{% endfor %}{% if add_generation_prompt %}{{ '<|im_start|>assistant\n' }}{% endif %}","eos_token":"<|im_end|>","pad_token":"<|im_end|>","unk_token":"<|endoftext|>"}},"createdAt":"2024-10-31T13:42:06.000Z","discussionsDisabled":false,"downloads":82250,"downloadsAllTime":82250,"id":"HuggingFaceTB/SmolLM2-1.7B-Instruct","isLikedByUser":false,"inference":"cold","lastModified":"2024-11-26T16:00:38.000Z","likes":381,"pipeline_tag":"text-generation","library_name":"transformers","librariesOther":["transformers.js"],"trackDownloads":true,"model-index":null,"private":false,"repoType":"model","gated":false,"pwcLink":{"error":"Unknown error, can't generate link to Papers With Code."},"tags":["transformers","tensorboard","onnx","safetensors","llama","text-generation","transformers.js","conversational","en","base_model:HuggingFaceTB/SmolLM2-1.7B","base_model:quantized:HuggingFaceTB/SmolLM2-1.7B","license:apache-2.0","autotrain_compatible","text-generation-inference","endpoints_compatible","region:us"],"tag_objs":[{"id":"text-generation","label":"Text Generation","type":"pipeline_tag","subType":"nlp"},{"id":"transformers","label":"Transformers","type":"library"},{"id":"tensorboard","label":"TensorBoard","type":"library"},{"id":"onnx","label":"ONNX","type":"library"},{"id":"safetensors","label":"Safetensors","type":"library"},{"id":"transformers.js","label":"Transformers.js","type":"library"},{"id":"en","label":"English","type":"language"},{"id":"llama","label":"llama","type":"other"},{"id":"conversational","label":"conversational","type":"other"},{"id":"base_model:HuggingFaceTB/SmolLM2-1.7B","label":"base_model:HuggingFaceTB/SmolLM2-1.7B","type":"other"},{"id":"base_model:quantized:HuggingFaceTB/SmolLM2-1.7B","label":"base_model:quantized:HuggingFaceTB/SmolLM2-1.7B","type":"other"},{"id":"autotrain_compatible","label":"AutoTrain Compatible","type":"other"},{"id":"text-generation-inference","label":"text-generation-inference","type":"other"},{"id":"endpoints_compatible","label":"Inference Endpoints","type":"other"},{"id":"license:apache-2.0","label":"apache-2.0","type":"license"},{"type":"region","label":"🇺🇸 Region: US","id":"region:us"}],"transformersInfo":{"auto_model":"AutoModelForCausalLM","pipeline_tag":"text-generation","processor":"AutoTokenizer"},"widgetData":[{"text":"Hey my name is Julien! How are you?"},{"text":"Hey my name is Thomas! How are you?"},{"text":"Hey my name is Mariama! How are you?"},{"text":"Hey my name is Clara! How are you?"},{"text":"Hey my name is Julien! How are you?"},{"text":"Hi."}],"safetensors":{"parameters":{"BF16":1711376384},"total":1711376384,"sharded":false},"hasBlockedOids":false},"canWrite":false,"shouldUpdateUrl":true,"includeCredentials":true,"isLoggedIn":false,"callApiOnMount":true}"><form class="flex w-full max-w-full flex-col "> <div class="mb-2 flex items-center justify-between font-semibold"><div class="flex items-center text-lg"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" focusable="false" role="img" class="-ml-1 mr-1 text-yellow-500" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 24 24"><path d="M11 15H6l7-14v8h5l-7 14v-8z" fill="currentColor"></path></svg> Inference API <a target="_blank" href="https://huggingface.co/docs/hub/models-widgets#example-outputs"><svg class="ml-1.5 text-sm text-gray-400 hover:text-black dark:hover:text-gray-200" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M17 22v-8h-4v2h2v6h-3v2h8v-2h-3z" fill="currentColor"></path><path d="M16 8a1.5 1.5 0 1 0 1.5 1.5A1.5 1.5 0 0 0 16 8z" fill="currentColor"></path><path d="M16 30a14 14 0 1 1 14-14a14 14 0 0 1-14 14zm0-26a12 12 0 1 0 12 12A12 12 0 0 0 16 4z" fill="currentColor"></path></svg></a></div> <div class="relative "> <button class=" " type="button"> <div slot="button" class="flex items-center gap-1 rounded-full px-1.5 py-0.5 text-sm capitalize bg-blue-500/10 hover:bg-blue-500/20 border !border-blue-500/15 text-blue-600 dark:text-blue-400"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" focusable="false" role="img" class="text-blue-500 dark:text-blue-400" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 24 24" fill="none"><path d="M11 15H6l7-14v8h5l-7 14v-8z" stroke="currentColor" stroke-width="2"></path></svg> cold <svg class="" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 24 24"><path d="M16.293 9.293L12 13.586L7.707 9.293l-1.414 1.414L12 16.414l5.707-5.707z" fill="currentColor"></path></svg></div> </button> </div></div> <div class="mb-0.5 flex w-full max-w-full flex-wrap items-center text-sm text-gray-500"><div class="mb-1.5 flex items-center gap-4"><a href="/tasks/text-generation" target="_blank" title="Learn more about text-generation"><div class="inline-flex items-center hover:underline"><svg class="mr-1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" fill="currentColor" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 18 18"><path d="M16.2607 8.08202L14.468 6.28928C14.3063 6.12804 14.0873 6.03749 13.859 6.03749C13.6307 6.03749 13.4117 6.12804 13.25 6.28928L5.6375 13.904V16.9125H8.64607L16.2607 9.30002C16.422 9.13836 16.5125 8.91935 16.5125 8.69102C16.5125 8.4627 16.422 8.24369 16.2607 8.08202V8.08202ZM8.1953 15.825H6.725V14.3547L11.858 9.22118L13.3288 10.6915L8.1953 15.825ZM14.0982 9.92262L12.6279 8.45232L13.8606 7.21964L15.3309 8.68994L14.0982 9.92262Z"></path><path d="M6.18125 9.84373H7.26875V6.03748H8.9V4.94998H4.55V6.03748H6.18125V9.84373Z"></path><path d="M4.55 11.475H2.375V2.775H11.075V4.95H12.1625V2.775C12.1625 2.48658 12.0479 2.20997 11.844 2.00602C11.64 1.80208 11.3634 1.6875 11.075 1.6875H2.375C2.08658 1.6875 1.80997 1.80208 1.60602 2.00602C1.40207 2.20997 1.2875 2.48658 1.2875 2.775V11.475C1.2875 11.7634 1.40207 12.04 1.60602 12.244C1.80997 12.4479 2.08658 12.5625 2.375 12.5625H4.55V11.475Z"></path></svg> <span>Text Generation</span></div></a></div> <div class="ml-auto flex gap-2"> <div class="flex gap-x-1 peer:"> <div class="relative mb-1.5 "> <div class="inline-flex w-32 justify-between rounded-md border border-gray-100 px-4 py-1"><div class="truncate text-sm">Examples</div> <svg class="-mr-1 ml-2 h-5 w-5 transition ease-in-out transform false" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true"><path fill-rule="evenodd" d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z" clip-rule="evenodd"></path></svg></div> </div></div></div></div> <div class="overflow-y-auto rounded-t-lg border border-b-0 leading-tight h-64"><div class="text-balance p-3 pt-6 text-center text-sm text-gray-400">Input a message to start chatting with <strong>HuggingFaceTB/SmolLM2-1.7B-Instruct</strong>. </div> <div class="flex flex-col items-end space-y-4 p-3"> </div></div> <div class="flex"> <div class="flex h-10 flex-grow"><div class="min-w-0 flex-1"> <span class="inline-block w-full"><span class="contents"><input class="form-input-alt w-full rounded-r-none rounded-t-none" placeholder="Your sentence here..." required type="text" autocomplete="off" value=""></span> </span></div> <span class="inline-block "><span class="contents"><button class="btn-widget h-10 w-24 px-5 rounded-l-none border-l-0 rounded-t-none" type="submit">Send</button></span> </span></div></div> <div class="mt-2"><div class="text-sm text-gray-400"></div> </div> <div class="flex items-center gap-x-2 text-sm text-gray-500"><button class="flex items-center hover:text-gray-700 dark:hover:text-gray-300" type="button"> <svg class="mr-1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32" style="transform: rotate(360deg);"><path d="M31 16l-7 7l-1.41-1.41L28.17 16l-5.58-5.59L24 9l7 7z" fill="currentColor"></path><path d="M1 16l7-7l1.41 1.41L3.83 16l5.58 5.59L8 23l-7-7z" fill="currentColor"></path><path d="M12.419 25.484L17.639 6l1.932.518L14.35 26z" fill="currentColor"></path></svg> View Code </button> <div class="ml-auto"> <span class="inline-block "><span class="contents"><button class="flex items-center hover:text-gray-700 dark:hover:text-gray-300" type="button"><svg class="mr-1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M22 16h2V8h-8v2h6v6z" fill="currentColor"></path><path d="M8 24h8v-2h-6v-6H8v8z" fill="currentColor"></path><path d="M26 28H6a2.002 2.002 0 0 1-2-2V6a2.002 2.002 0 0 1 2-2h20a2.002 2.002 0 0 1 2 2v20a2.002 2.002 0 0 1-2 2zM6 6v20h20.001L26 6z" fill="currentColor"></path></svg> Maximize</button></span> </span></div></div></form></div></div> <div class="divider-column-vertical"></div> <h2 class="mb-3 flex items-baseline overflow-hidden whitespace-nowrap text-smd font-semibold text-gray-800"><svg class="mr-1 inline self-center flex-none" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 16 16"><path fill-rule="evenodd" clip-rule="evenodd" d="M3.9 5.34v4.07a3.68 3.68 0 0 0 3.68 3.68h1.99v-1.47H7.58c-1.21 0-2.2-1-2.2-2.21v-1.6c.63.5 1.4.76 2.2.76h1.99V7.1H7.58a2.21 2.21 0 0 1-2.16-1.76H3.9Z" fill="currentColor" fill-opacity=".5"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M2.9 2.36c0-.3.25-.55.55-.55h2.43c.3 0 .55.25.55.55v2.43c0 .3-.24.55-.55.55H3.45a.55.55 0 0 1-.55-.55V2.36Zm6.67 4.23c0-.3.24-.55.55-.55h2.43c.3 0 .55.25.55.55v2.44c0 .3-.25.55-.55.55h-2.43a.55.55 0 0 1-.55-.55V6.59Zm.55 4.07c-.3 0-.55.24-.55.55v2.43c0 .3.24.55.55.55h2.43c.3 0 .55-.25.55-.55v-2.43c0-.3-.25-.55-.55-.55h-2.43Z" fill="currentColor" fill-opacity=".85"></path></svg> Model tree for <span class="ml-1 truncate font-mono text-[0.86rem] font-medium">HuggingFaceTB/SmolLM2-1.7B-Instruct</span> <a href="/docs/hub/model-cards#specifying-a-base-model" target="_blank" class="ml-1 translate-y-px self-center text-xs text-gray-400 hover:text-gray-700 dark:hover:text-gray-200 max-xl:hidden"><svg class="" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M17 22v-8h-4v2h2v6h-3v2h8v-2h-3z" fill="currentColor"></path><path d="M16 8a1.5 1.5 0 1 0 1.5 1.5A1.5 1.5 0 0 0 16 8z" fill="currentColor"></path><path d="M16 30a14 14 0 1 1 14-14a14 14 0 0 1-14 14zm0-26a12 12 0 1 0 12 12A12 12 0 0 0 16 4z" fill="currentColor"></path></svg></a></h2> <div class="flex flex-col space-y-0 whitespace-nowrap pl-1 text-smd text-gray-800"><div class="flex h-[28px] w-full items-center justify-between"><p class="font-semibold">Base model</p> <div class="mx-3 flex-1 translate-y-[2.5px] self-center border-b border-dotted dark:border-gray-800"></div> <a href="/HuggingFaceTB/SmolLM2-1.7B" class="truncate font-mono text-xs underline decoration-gray-300 hover:decoration-gray-600 dark:decoration-gray-500 dark:hover:decoration-gray-200">HuggingFaceTB/SmolLM2-1.7B</a> </div><div class="mb-1.5 flex h-[28px] items-center justify-between" style="padding-left: 0px"><div class="relative h-[28px] w-[19px] flex-none"><svg width="15" height="28" class="text-gray-300 dark:text-gray-700" viewBox="0 0 15 28" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M0.967742 0C0.967742 7.67991 7.21819 13.9655 15 13.9655V15C6.74768 15 0 8.3173 0 0H0.967742Z" fill="currentColor"></path></svg></div> <div class="mr-auto flex items-center font-semibold"><svg class="mr-1 inline self-center flex-none text-gray-400" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 12 12"><path fill-rule="evenodd" clip-rule="evenodd" d="M6.33 8.56A.57.57 0 0 1 6 8.6v1.58c.13 0 .27-.03.39-.09L9.3 8.42a.88.88 0 0 0 .44-.77v-3.3a.91.91 0 0 0-.12-.45l-1.3.75.02.04c.05.09.07.18.08.28v2.06a.55.55 0 0 1-.28.48L6.33 8.56Z" fill="currentColor"></path><path opacity=".25" d="m7.32 5.3-1.23.72-1.23-.71a.3.3 0 0 1 .1-.1l.98-.57a.3.3 0 0 1 .3 0l.98.56a.3.3 0 0 1 .1.1Z" fill="currentColor"></path><path opacity=".5" d="M6.09 6.02v1.43a.31.31 0 0 1-.14-.04l-.98-.57a.3.3 0 0 1-.15-.26V5.46c0-.05.01-.1.04-.15l1.23.71Z" fill="currentColor"></path><path d="M7.36 5.46v1.12a.3.3 0 0 1-.15.26l-.99.58a.31.31 0 0 1-.13.03V6.02l1.23-.71c.03.05.04.1.04.15Z" fill="currentColor"></path><path opacity=".5" fill-rule="evenodd" clip-rule="evenodd" d="M3.8 4.73a.57.57 0 0 0-.05.24v2.06a.55.55 0 0 0 .28.48l1.8 1.04c.06.03.11.04.17.05v1.6a.92.92 0 0 1-.4-.1L2.7 8.42a.88.88 0 0 1-.45-.77v-3.3a.9.9 0 0 1 .12-.45l1.44.83Z" fill="currentColor"></path><path opacity=".25" fill-rule="evenodd" clip-rule="evenodd" d="m8.33 4.65 1.3-.75a.88.88 0 0 0-.3-.31L6.43 1.92a.9.9 0 0 0-.88 0L2.68 3.6a.87.87 0 0 0-.31.31l1.44.83.02-.04a.54.54 0 0 1 .19-.2l1.8-1.03c.16-.1.37-.1.54 0l1.8 1.04c.07.04.12.09.17.15Z" fill="currentColor"></path></svg> Quantized</div> <span class="ml-1 text-gray-600 dark:text-gray-400">(<a href="/models?other=base_model:quantized:HuggingFaceTB/SmolLM2-1.7B" class="underline decoration-gray-300 hover:text-gray-900 hover:decoration-gray-600 dark:text-gray-300 dark:decoration-gray-500 dark:hover:text-gray-100 dark:hover:decoration-gray-200">14</a>) </span> <div class="mx-3 flex-1 translate-y-[2.5px] self-center border-b border-dotted dark:border-gray-800"></div> <div class="flex items-center justify-center rounded-full bg-blue-500/10 px-2 text-blue-600 dark:text-blue-500" title="HuggingFaceTB/SmolLM2-1.7B-Instruct">this model </div> </div> <div class="flex w-full flex-col justify-center space-y-0" style="padding-left: 24px"><div class="flex h-[28px] w-full items-center justify-between gap-1.5"><div class="relative h-[28px] w-[19px] flex-none"><div class="left absolute inset-y-0 -top-[3px] left-0 w-px bg-gray-300 dark:bg-gray-700"></div> <svg class="text-gray-300 dark:text-gray-700" width="19" height="28" viewBox="0 0 19 28" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M1 0C1 7.42391 7.4588 13.5 15.5 13.5V14.5C6.9726 14.5 0 8.04006 0 0H1Z" fill="currentColor"></path></svg></div> <div class="font-semibold">Adapters</div> <div class="mx-3 flex-1 translate-y-[2.5px] self-center border-b border-dotted dark:border-gray-800"></div> <a class="text-gray-700 underline decoration-gray-300 hover:text-gray-900 hover:decoration-gray-600 dark:text-gray-300 dark:decoration-gray-500 dark:hover:text-gray-100 dark:hover:decoration-gray-200" href="/models?other=base_model:adapter:HuggingFaceTB/SmolLM2-1.7B-Instruct">2 models</a> </div><div class="flex h-[28px] w-full items-center justify-between gap-1.5"><div class="relative h-[28px] w-[19px] flex-none"><div class="left absolute inset-y-0 -top-[3px] left-0 w-px bg-gray-300 dark:bg-gray-700"></div> <svg class="text-gray-300 dark:text-gray-700" width="19" height="28" viewBox="0 0 19 28" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M1 0C1 7.42391 7.4588 13.5 15.5 13.5V14.5C6.9726 14.5 0 8.04006 0 0H1Z" fill="currentColor"></path></svg></div> <div class="font-semibold">Finetunes</div> <div class="mx-3 flex-1 translate-y-[2.5px] self-center border-b border-dotted dark:border-gray-800"></div> <a class="text-gray-700 underline decoration-gray-300 hover:text-gray-900 hover:decoration-gray-600 dark:text-gray-300 dark:decoration-gray-500 dark:hover:text-gray-100 dark:hover:decoration-gray-200" href="/models?other=base_model:finetune:HuggingFaceTB/SmolLM2-1.7B-Instruct">22 models</a> </div><div class="flex h-[28px] w-full items-center justify-between gap-1.5"><div class="relative h-[28px] w-[19px] flex-none"><div class="left absolute inset-y-0 -top-[3px] left-0 w-px bg-gray-300 dark:bg-gray-700"></div> <svg class="text-gray-300 dark:text-gray-700" width="19" height="28" viewBox="0 0 19 28" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M1 0C1 7.42391 7.4588 13.5 15.5 13.5V14.5C6.9726 14.5 0 8.04006 0 0H1Z" fill="currentColor"></path></svg></div> <div class="font-semibold">Merges</div> <div class="mx-3 flex-1 translate-y-[2.5px] self-center border-b border-dotted dark:border-gray-800"></div> <a class="text-gray-700 underline decoration-gray-300 hover:text-gray-900 hover:decoration-gray-600 dark:text-gray-300 dark:decoration-gray-500 dark:hover:text-gray-100 dark:hover:decoration-gray-200" href="/models?other=base_model:merge:HuggingFaceTB/SmolLM2-1.7B-Instruct">2 models</a> </div><div class="flex h-[28px] w-full items-center justify-between gap-1.5"><div class="relative h-[28px] w-[19px] flex-none"><div class="left absolute inset-y-0 -top-[3px] left-0 bottom-[28px] w-px bg-gray-300 dark:bg-gray-700"></div> <svg class="text-gray-300 dark:text-gray-700" width="19" height="28" viewBox="0 0 19 28" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M1 0C1 7.42391 7.4588 13.5 15.5 13.5V14.5C6.9726 14.5 0 8.04006 0 0H1Z" fill="currentColor"></path></svg></div> <div class="font-semibold">Quantizations</div> <div class="mx-3 flex-1 translate-y-[2.5px] self-center border-b border-dotted dark:border-gray-800"></div> <a class="text-gray-700 underline decoration-gray-300 hover:text-gray-900 hover:decoration-gray-600 dark:text-gray-300 dark:decoration-gray-500 dark:hover:text-gray-100 dark:hover:decoration-gray-200" href="/models?other=base_model:quantized:HuggingFaceTB/SmolLM2-1.7B-Instruct">40 models</a> </div></div></div> <div class="divider-column-vertical"></div> <h2 class="mb-5 flex items-baseline overflow-hidden whitespace-nowrap text-smd font-semibold text-gray-800"><svg class="mr-1 inline self-center flex-none" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" focusable="false" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 32 32"><path d="M7.80914 18.7462V24.1907H13.2536V18.7462H7.80914Z" fill="#FF3270"></path><path d="M18.7458 18.7462V24.1907H24.1903V18.7462H18.7458Z" fill="#861FFF"></path><path d="M7.80914 7.80982V13.2543H13.2536V7.80982H7.80914Z" fill="#097EFF"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M4 6.41775C4 5.08246 5.08246 4 6.41775 4H14.6457C15.7626 4 16.7026 4.75724 16.9802 5.78629C18.1505 4.67902 19.7302 4 21.4685 4C25.0758 4 28.0003 6.92436 28.0003 10.5317C28.0003 12.27 27.3212 13.8497 26.2139 15.02C27.243 15.2977 28.0003 16.2376 28.0003 17.3545V25.5824C28.0003 26.9177 26.9177 28.0003 25.5824 28.0003H17.0635H14.9367H6.41775C5.08246 28.0003 4 26.9177 4 25.5824V15.1587V14.9367V6.41775ZM7.80952 7.80952V13.254H13.254V7.80952H7.80952ZM7.80952 24.1907V18.7462H13.254V24.1907H7.80952ZM18.7462 24.1907V18.7462H24.1907V24.1907H18.7462ZM18.7462 10.5317C18.7462 9.0283 19.9651 7.80952 21.4685 7.80952C22.9719 7.80952 24.1907 9.0283 24.1907 10.5317C24.1907 12.0352 22.9719 13.254 21.4685 13.254C19.9651 13.254 18.7462 12.0352 18.7462 10.5317Z" fill="black"></path><path d="M21.4681 7.80982C19.9647 7.80982 18.7458 9.02861 18.7458 10.5321C18.7458 12.0355 19.9647 13.2543 21.4681 13.2543C22.9715 13.2543 24.1903 12.0355 24.1903 10.5321C24.1903 9.02861 22.9715 7.80982 21.4681 7.80982Z" fill="#FFD702"></path></svg> Spaces using <span class="ml-1 truncate font-mono text-[0.86rem] font-medium">HuggingFaceTB/SmolLM2-1.7B-Instruct</span> <span class="ml-3 font-normal text-gray-400">30</span></h2> <div class="SVELTE_HYDRATER contents" data-target="LinkedSpacesList" data-props="{"linkedSpaces":[{"emoji":"🏢","id":"akhaliq/anychat","running":true},{"emoji":"🥇","id":"logikon/open_cot_leaderboard","running":true,"shortDescription":"Track, rank and evaluate open LLMs' CoT quality"},{"emoji":"🤏","id":"Nymbo/SmolLM2-1.7B-Instruct-Serverless","running":true,"shortDescription":"New SOTA smol king by Hugging Face"},{"emoji":"📊","id":"cot-leaderboard/open-cot-dashboard","running":true},{"emoji":"🌍","id":"crystal99/HuggingFaceTB-SmolLM2-1.7B-Instruct","running":true},{"emoji":"🐢","id":"Kabilash10/HuggingFaceTB-SmolLM2-1.7B-Instruct","running":false},{"emoji":"📈","id":"ireinisi/arambot","running":false},{"emoji":"🦀","id":"tree3po/HuggingFaceTB-SmolLM2-1.7B-Instruct","running":false},{"emoji":"⚡","id":"wang12311/HuggingFaceTB-SmolLM2-1.7B-Instruct","running":false},{"emoji":"📊","id":"DexterSptizu/SmolLM2-1.7B-Instruct","running":false},{"emoji":"🚀","id":"Eightsds/HuggingFaceTB-SmolLM2-1.7B-Instruct","running":false},{"emoji":"🐠","id":"Park07/HuggingFaceTB-SmolLM2-1.7B-Instruct","running":false},{"emoji":"🌍","id":"Bgiangiordano/HuggingFaceTB-SmolLM2-1.7B-Instruct","running":false},{"emoji":"🐠","id":"alyliann/CTP-Wordle-Suggestions","running":false,"shortDescription":"Wordle word suggestions"},{"emoji":"💬","id":"wifix199/Gpt3","running":true},{"emoji":"🏢","id":"willbraun/WordSync","running":false,"shortDescription":"Word association game"},{"emoji":"💬","id":"milk639/HuggingFaceTB-SmolLM2-1.7B-Instruct","running":false,"shortDescription":"Test"},{"emoji":"💬","id":"Twistedtre/HuggingFaceTB-SmolLM2-1.7B-Instruct","running":false},{"emoji":"🖼","id":"brunoxcruz/HuggingFaceTB-SmolLM2-1.7B-Instruct","running":false},{"emoji":"😻","id":"brunoxcruz/HuggingFaceTB-SmolLM2-1.7B-Instruct2","running":true},{"emoji":"💬","id":"Jeff28/Rie08","running":false},{"emoji":"😻","id":"Artificial-superintelligence/SmolLM2-1.7B-Instruct","running":false,"shortDescription":"SmolLM2-1.7B-Instruct "},{"emoji":"💬","id":"cibey/HuggingFaceTB-SmolLM2-1.7B-Instruct","running":false,"shortDescription":"Cibey smol 1.7"},{"emoji":"💬","id":"cibey/Cibey_chatbot","running":false,"shortDescription":"Cibey smol 1.7"},{"emoji":"🌍","id":"derricka59/HuggingFaceTB-SmolLM2-1.7B-Instruct","running":false},{"emoji":"💬","id":"yichennn/HuggingFaceTB-SmolLM2-1.7B-Instruct","running":false},{"emoji":"⚡️","id":"freddyaboulton/smollm-voice-code-editor","running":true,"shortDescription":"Build simple HTML websites by talking to Smol-LM"},{"emoji":"🏢","id":"vuxuanhoan/anychat","running":false},{"emoji":"📚","id":"AiActivity/AI-Assistant","running":true,"shortDescription":"Ai free model"},{"emoji":"📈","id":"NAITIVEAIAGENCY/HuggingFaceTB-SmolLM2-1.7B-Instruct","running":true}]}"><nav class="flex max-w-full flex-wrap gap-x-2.5 gap-y-2"><a href="/spaces/akhaliq/anychat" class="flex min-w-0 items-center whitespace-nowrap rounded-lg border border-gray-100 px-2 text-xs leading-relaxed text-gray-500 shadow-sm hover:text-gray-800 dark:hover:text-gray-200 md:text-sm md:leading-relaxed "><div class="mr-2 flex-none text-[0.6rem]">🏢</div> <div class="truncate group-hover:underline">akhaliq/anychat</div></a><a href="/spaces/logikon/open_cot_leaderboard" class="flex min-w-0 items-center whitespace-nowrap rounded-lg border border-gray-100 px-2 text-xs leading-relaxed text-gray-500 shadow-sm hover:text-gray-800 dark:hover:text-gray-200 md:text-sm md:leading-relaxed "><div class="mr-2 flex-none text-[0.6rem]">🥇</div> <div class="truncate group-hover:underline">logikon/open_cot_leaderboard</div></a><a href="/spaces/Nymbo/SmolLM2-1.7B-Instruct-Serverless" class="flex min-w-0 items-center whitespace-nowrap rounded-lg border border-gray-100 px-2 text-xs leading-relaxed text-gray-500 shadow-sm hover:text-gray-800 dark:hover:text-gray-200 md:text-sm md:leading-relaxed "><div class="mr-2 flex-none text-[0.6rem]">🤏</div> <div class="truncate group-hover:underline">Nymbo/SmolLM2-1.7B-Instruct-Serverless</div></a><a href="/spaces/cot-leaderboard/open-cot-dashboard" class="flex min-w-0 items-center whitespace-nowrap rounded-lg border border-gray-100 px-2 text-xs leading-relaxed text-gray-500 shadow-sm hover:text-gray-800 dark:hover:text-gray-200 md:text-sm md:leading-relaxed "><div class="mr-2 flex-none text-[0.6rem]">📊</div> <div class="truncate group-hover:underline">cot-leaderboard/open-cot-dashboard</div></a><a href="/spaces/crystal99/HuggingFaceTB-SmolLM2-1.7B-Instruct" class="flex min-w-0 items-center whitespace-nowrap rounded-lg border border-gray-100 px-2 text-xs leading-relaxed text-gray-500 shadow-sm hover:text-gray-800 dark:hover:text-gray-200 md:text-sm md:leading-relaxed "><div class="mr-2 flex-none text-[0.6rem]">🌍</div> <div class="truncate group-hover:underline">crystal99/HuggingFaceTB-SmolLM2-1.7B-Instruct</div></a><a href="/spaces/wifix199/Gpt3" class="flex min-w-0 items-center whitespace-nowrap rounded-lg border border-gray-100 px-2 text-xs leading-relaxed text-gray-500 shadow-sm hover:text-gray-800 dark:hover:text-gray-200 md:text-sm md:leading-relaxed !hidden md:!flex"><div class="mr-2 flex-none text-[0.6rem]">💬</div> <div class="truncate group-hover:underline">wifix199/Gpt3</div></a><a href="/spaces/brunoxcruz/HuggingFaceTB-SmolLM2-1.7B-Instruct2" class="flex min-w-0 items-center whitespace-nowrap rounded-lg border border-gray-100 px-2 text-xs leading-relaxed text-gray-500 shadow-sm hover:text-gray-800 dark:hover:text-gray-200 md:text-sm md:leading-relaxed !hidden md:!flex"><div class="mr-2 flex-none text-[0.6rem]">😻</div> <div class="truncate group-hover:underline">brunoxcruz/HuggingFaceTB-SmolLM2-1.7B-Instruct2</div></a><a href="/spaces/freddyaboulton/smollm-voice-code-editor" class="flex min-w-0 items-center whitespace-nowrap rounded-lg border border-gray-100 px-2 text-xs leading-relaxed text-gray-500 shadow-sm hover:text-gray-800 dark:hover:text-gray-200 md:text-sm md:leading-relaxed !hidden md:!flex"><div class="mr-2 flex-none text-[0.6rem]">⚡️</div> <div class="truncate group-hover:underline">freddyaboulton/smollm-voice-code-editor</div></a><a href="/spaces/AiActivity/AI-Assistant" class="flex min-w-0 items-center whitespace-nowrap rounded-lg border border-gray-100 px-2 text-xs leading-relaxed text-gray-500 shadow-sm hover:text-gray-800 dark:hover:text-gray-200 md:text-sm md:leading-relaxed !hidden md:!flex"><div class="mr-2 flex-none text-[0.6rem]">📚</div> <div class="truncate group-hover:underline">AiActivity/AI-Assistant</div></a><a href="/spaces/NAITIVEAIAGENCY/HuggingFaceTB-SmolLM2-1.7B-Instruct" class="flex min-w-0 items-center whitespace-nowrap rounded-lg border border-gray-100 px-2 text-xs leading-relaxed text-gray-500 shadow-sm hover:text-gray-800 dark:hover:text-gray-200 md:text-sm md:leading-relaxed !hidden md:!flex"><div class="mr-2 flex-none text-[0.6rem]">📈</div> <div class="truncate group-hover:underline">NAITIVEAIAGENCY/HuggingFaceTB-SmolLM2-1.7B-Instruct</div></a><a href="/spaces/Kabilash10/HuggingFaceTB-SmolLM2-1.7B-Instruct" class="flex min-w-0 items-center whitespace-nowrap rounded-lg border border-gray-100 px-2 text-xs leading-relaxed text-gray-500 shadow-sm hover:text-gray-800 dark:hover:text-gray-200 md:text-sm md:leading-relaxed opacity-40 !hidden md:!flex"><div class="mr-2 flex-none text-[0.6rem]">🐢</div> <div class="truncate group-hover:underline">Kabilash10/HuggingFaceTB-SmolLM2-1.7B-Instruct</div></a><a href="/spaces/ireinisi/arambot" class="flex min-w-0 items-center whitespace-nowrap rounded-lg border border-gray-100 px-2 text-xs leading-relaxed text-gray-500 shadow-sm hover:text-gray-800 dark:hover:text-gray-200 md:text-sm md:leading-relaxed opacity-40 !hidden md:!flex"><div class="mr-2 flex-none text-[0.6rem]">📈</div> <div class="truncate group-hover:underline">ireinisi/arambot</div></a> <button class="flex items-center rounded-lg border-gray-100 px-2 text-xs leading-relaxed text-gray-600 hover:bg-gray-100 hover:text-gray-600 hover:ring-1 hover:ring-inset hover:ring-gray-100 dark:hover:bg-gray-800 dark:hover:text-gray-300 dark:hover:ring-gray-700 md:hidden md:text-sm">+ 25 Spaces </button> <button class="hidden items-center rounded-lg border-gray-100 px-2 text-xs leading-relaxed text-gray-600 hover:bg-gray-100 hover:text-gray-600 hover:ring-1 hover:ring-inset hover:ring-gray-100 dark:hover:bg-gray-800 dark:hover:text-gray-300 dark:hover:ring-gray-700 md:flex md:text-sm">+ 18 Spaces </button></nav></div> <div class="divider-column-vertical"></div> <h2 class="mb-5 flex items-baseline overflow-hidden whitespace-nowrap text-smd font-semibold text-gray-800"><svg class="mr-1 inline self-center flex-none" width="1em" height="1em" aria-hidden="true" focusable="false" role="img" viewBox="0 0 12 13" fill="none" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><rect x="2" y="2.49902" width="8" height="3.76425" rx="1.16774" fill="currentColor" fill-opacity="0.4"></rect><rect x="6.21875" y="6.7334" width="3.78055" height="3.76425" rx="1.16774" fill="currentColor" fill-opacity="0.7"></rect><rect x="2" y="6.73438" width="3.78055" height="3.76425" rx="1.16774" fill="currentColor" fill-opacity="0.5"></rect></svg> Collection including <span class="ml-1 truncate font-mono text-[0.86rem] font-medium">HuggingFaceTB/SmolLM2-1.7B-Instruct</span></h2> <div class="flex flex-col gap-3"> <div class="flex flex-col"><article class="overview-card-wrapper group/collection relative !rounded-md !from-white !to-white dark:!from-gray-900 dark:!to-gray-900 peer"><a href="/collections/HuggingFaceTB/smollm2-6723884218bcda64b34d7db9" class="block p-2"><header class="mb-0.5 flex items-center" title="SmolLM2"><h4 class="text-md truncate text-smd font-semibold group-hover/collection:underline">SmolLM2</h4> <div class="ml-2 flex items-center rounded sm:ml-2.5 bg-indigo-500/10 py-0.5 pl-1 pr-1.5 text-xs leading-none text-gray-700"><svg class="mr-0.5 flex-none text-indigo-700" width="1em" height="1em" aria-hidden="true" focusable="false" role="img" viewBox="0 0 12 13" fill="none" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><rect x="2" y="2.49902" width="8" height="3.76425" rx="1.16774" fill="currentColor" fill-opacity="0.4"></rect><rect x="6.21875" y="6.7334" width="3.78055" height="3.76425" rx="1.16774" fill="currentColor" fill-opacity="0.7"></rect><rect x="2" y="6.73438" width="3.78055" height="3.76425" rx="1.16774" fill="currentColor" fill-opacity="0.5"></rect></svg> Collection </div></header> <div class="mr-1 flex items-center overflow-hidden whitespace-nowrap text-sm leading-tight text-gray-400"><span class="max-w-64 truncate">State-of-the-art compact LLMs for on-device applications: 1.7B, 360M, 135M</span> <span class="px-1.5 text-gray-300">• </span> <span>15 items</span> <span class="px-1.5 text-gray-300">• </span> <span class="truncate">Updated <time datetime="2024-11-27T14:43:24" title="2024-11-27T14:43:24.831Z">about 5 hours ago</time></span> <span class="px-1.5 text-gray-300">•</span> <svg class="flex-none w-3 mr-1 text-gray-400" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 12 12" fill="transparent"><path d="M9.30013 9.29152H9.3H2.7H2.69987C2.62308 9.29154 2.54762 9.27146 2.481 9.23328C2.41437 9.1951 2.3589 9.14015 2.32009 9.07389C2.28128 9.00763 2.26048 8.93237 2.25977 8.85558C2.25907 8.7798 2.27796 8.70513 2.31458 8.63882L5.62238 2.9426L5.67518 2.85168C5.7059 2.81806 5.74178 2.78928 5.78164 2.76649C5.84813 2.72848 5.9234 2.70848 6 2.70848C6.0766 2.70848 6.15187 2.72848 6.21836 2.76649C6.28441 2.80425 6.33953 2.85848 6.37836 2.92389L9.68527 8.63855C9.72199 8.70493 9.74093 8.7797 9.74023 8.85558C9.73952 8.93237 9.71872 9.00763 9.67991 9.07389C9.6411 9.14015 9.58563 9.1951 9.519 9.23328C9.45238 9.27146 9.37692 9.29154 9.30013 9.29152Z" stroke="currentColor"></path></svg> 179</div></a></article> <div class="overview-card-wrapper -z-1 !rounded-md !bg-gradient-to-t -mt-[1.60rem] h-8 scale-x-[98%] !from-gray-50 !to-gray-50 !shadow-none transition-transform peer-hover:-translate-y-[2px] peer-hover:from-gray-100/80 dark:!from-gray-925 dark:!to-gray-925 dark:peer-hover:from-black"></div></div></div> <div class="SVELTE_HYDRATER contents" data-target="ModelEvalResults" data-props="{"model":{"author":"HuggingFaceTB","cardData":{"library_name":"transformers","license":"apache-2.0","language":["en"],"pipeline_tag":"text-generation","tags":["safetensors","onnx","transformers.js"],"base_model":["HuggingFaceTB/SmolLM2-1.7B"]},"cardExists":true,"config":{"architectures":["LlamaForCausalLM"],"model_type":"llama","tokenizer_config":{"bos_token":"<|im_start|>","chat_template":"{% for message in messages %}{% if loop.first and messages[0]['role'] != 'system' %}{{ '<|im_start|>system\nYou are a helpful AI assistant named SmolLM, trained by Hugging Face<|im_end|>\n' }}{% endif %}{{'<|im_start|>' + message['role'] + '\n' + message['content'] + '<|im_end|>' + '\n'}}{% endfor %}{% if add_generation_prompt %}{{ '<|im_start|>assistant\n' }}{% endif %}","eos_token":"<|im_end|>","pad_token":"<|im_end|>","unk_token":"<|endoftext|>"}},"createdAt":"2024-10-31T13:42:06.000Z","discussionsDisabled":false,"downloads":82250,"downloadsAllTime":82250,"id":"HuggingFaceTB/SmolLM2-1.7B-Instruct","isLikedByUser":false,"inference":"cold","lastModified":"2024-11-26T16:00:38.000Z","likes":381,"pipeline_tag":"text-generation","library_name":"transformers","librariesOther":["transformers.js"],"trackDownloads":true,"model-index":null,"private":false,"repoType":"model","gated":false,"pwcLink":{"error":"Unknown error, can't generate link to Papers With Code."},"tags":["transformers","tensorboard","onnx","safetensors","llama","text-generation","transformers.js","conversational","en","base_model:HuggingFaceTB/SmolLM2-1.7B","base_model:quantized:HuggingFaceTB/SmolLM2-1.7B","license:apache-2.0","autotrain_compatible","text-generation-inference","endpoints_compatible","region:us"],"tag_objs":[{"id":"text-generation","label":"Text Generation","type":"pipeline_tag","subType":"nlp"},{"id":"transformers","label":"Transformers","type":"library"},{"id":"tensorboard","label":"TensorBoard","type":"library"},{"id":"onnx","label":"ONNX","type":"library"},{"id":"safetensors","label":"Safetensors","type":"library"},{"id":"transformers.js","label":"Transformers.js","type":"library"},{"id":"en","label":"English","type":"language"},{"id":"llama","label":"llama","type":"other"},{"id":"conversational","label":"conversational","type":"other"},{"id":"base_model:HuggingFaceTB/SmolLM2-1.7B","label":"base_model:HuggingFaceTB/SmolLM2-1.7B","type":"other"},{"id":"base_model:quantized:HuggingFaceTB/SmolLM2-1.7B","label":"base_model:quantized:HuggingFaceTB/SmolLM2-1.7B","type":"other"},{"id":"autotrain_compatible","label":"AutoTrain Compatible","type":"other"},{"id":"text-generation-inference","label":"text-generation-inference","type":"other"},{"id":"endpoints_compatible","label":"Inference Endpoints","type":"other"},{"id":"license:apache-2.0","label":"apache-2.0","type":"license"},{"type":"region","label":"🇺🇸 Region: US","id":"region:us"}],"transformersInfo":{"auto_model":"AutoModelForCausalLM","pipeline_tag":"text-generation","processor":"AutoTokenizer"},"widgetData":[{"text":"Hey my name is Julien! How are you?"},{"text":"Hey my name is Thomas! How are you?"},{"text":"Hey my name is Mariama! How are you?"},{"text":"Hey my name is Clara! How are you?"},{"text":"Hey my name is Julien! How are you?"},{"text":"Hi."}],"safetensors":{"parameters":{"BF16":1711376384},"total":1711376384,"sharded":false},"hasBlockedOids":false}}"></div> <div class="divider-column-vertical md:hidden"></div></section></div></main> <footer class="b-12 mb-2 flex border-t border-gray-100 md:h-14"><nav class="container flex flex-col justify-between space-y-2 py-6 text-gray-500 md:flex-row md:items-center md:space-y-0 md:py-0 md:text-sm"><div class="font-semibold text-black md:hidden">Company</div> <div class="order-last pt-6 text-gray-400 md:order-none md:pt-0" href="Terms">© Hugging Face</div> <a class="hover:underline" href="/terms-of-service">TOS</a> <a class="hover:underline" href="/privacy">Privacy</a> <a class="hover:underline" href="/huggingface">About</a> <a class="hover:underline" href="https://apply.workable.com/huggingface/">Jobs</a> <a href="/" class="group order-first flex-none pb-6 md:order-none md:pb-0"><svg class="h-7 w-7 transition-transform group-hover:-translate-y-px" viewBox="0 0 95 88" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M47.2119 76.5C66.4037 76.5 81.9619 60.9419 81.9619 41.75C81.9619 22.5581 66.4037 7 47.2119 7C28.02 7 12.4619 22.5581 12.4619 41.75C12.4619 60.9419 28.02 76.5 47.2119 76.5Z" fill="#FFD21E"></path><path d="M81.9619 41.75C81.9619 22.5581 66.4037 7 47.2119 7C28.02 7 12.4619 22.5581 12.4619 41.75C12.4619 60.9419 28.02 76.5 47.2119 76.5C66.4037 76.5 81.9619 60.9419 81.9619 41.75ZM8.46185 41.75C8.46185 20.349 25.8108 3 47.2119 3C68.6129 3 85.9619 20.349 85.9619 41.75C85.9619 63.151 68.6129 80.5 47.2119 80.5C25.8108 80.5 8.46185 63.151 8.46185 41.75Z" fill="#FF9D0B"></path><path d="M58.5024 32.2915C59.7768 32.7415 60.2839 35.3615 61.5713 34.6769C64.0095 33.3805 64.9351 30.353 63.6387 27.9148C62.3423 25.4767 59.3148 24.5511 56.8766 25.8475C54.4384 27.1439 53.5128 30.1714 54.8092 32.6096C55.4211 33.7604 57.3632 31.8892 58.5024 32.2915Z" fill="#3A3B45"></path><path d="M34.9454 32.2915C33.671 32.7415 33.164 35.3615 31.8766 34.6769C29.4384 33.3805 28.5128 30.353 29.8092 27.9148C31.1056 25.4767 34.1331 24.5511 36.5713 25.8475C39.0095 27.1439 39.9351 30.1714 38.6387 32.6096C38.0268 33.7604 36.0846 31.8892 34.9454 32.2915Z" fill="#3A3B45"></path><path d="M46.9619 56.289C56.7903 56.289 59.9619 47.5261 59.9619 43.0262C59.9619 40.6875 58.3898 41.4236 55.8718 42.6702C53.5449 43.8222 50.4102 45.4101 46.9619 45.4101C39.7822 45.4101 33.9619 38.5263 33.9619 43.0262C33.9619 47.5261 37.1334 56.289 46.9619 56.289Z" fill="#3A3B45"></path><mask id="mask0" mask-type="alpha" maskUnits="userSpaceOnUse" x="33" y="41" width="27" height="16"><path d="M46.9619 56.289C56.7903 56.289 59.9619 47.5261 59.9619 43.0262C59.9619 40.6875 58.3898 41.4236 55.8718 42.6702C53.5449 43.8222 50.4102 45.4101 46.9619 45.4101C39.7822 45.4101 33.9619 38.5263 33.9619 43.0262C33.9619 47.5261 37.1334 56.289 46.9619 56.289Z" fill="white"></path></mask><g mask="url(#mask0)"><path d="M47.2119 66.5C52.0018 66.5 55.8848 62.617 55.8848 57.8271C55.8848 54.0962 53.5291 50.9156 50.224 49.6915C50.1023 49.6464 49.9794 49.604 49.8553 49.5643C49.0219 49.2979 48.1337 52.1623 47.2119 52.1623C46.3506 52.1623 45.5186 49.2797 44.7332 49.5135C41.151 50.5799 38.5389 53.8984 38.5389 57.8271C38.5389 62.617 42.4219 66.5 47.2119 66.5Z" fill="#F94040"></path></g><path d="M70.7119 37C72.5068 37 73.9619 35.5449 73.9619 33.75C73.9619 31.9551 72.5068 30.5 70.7119 30.5C68.9169 30.5 67.4619 31.9551 67.4619 33.75C67.4619 35.5449 68.9169 37 70.7119 37Z" fill="#FF9D0B"></path><path d="M24.2119 37C26.0068 37 27.4619 35.5449 27.4619 33.75C27.4619 31.9551 26.0068 30.5 24.2119 30.5C22.4169 30.5 20.9619 31.9551 20.9619 33.75C20.9619 35.5449 22.4169 37 24.2119 37Z" fill="#FF9D0B"></path><path class="origin-bottom-right transition-transform group-hover:-rotate-6" d="M17.5238 48C15.9048 48 14.4578 48.665 13.4488 49.871C12.8248 50.618 12.1728 51.822 12.1198 53.625C11.4408 53.43 10.7878 53.321 10.1778 53.321C8.6278 53.321 7.2278 53.915 6.2378 54.994C4.9658 56.379 4.4008 58.081 4.6468 59.784C4.7638 60.595 5.0348 61.322 5.4398 61.995C4.5858 62.686 3.9568 63.648 3.6528 64.805C3.4148 65.712 3.1708 67.601 4.4448 69.547C4.3638 69.674 4.2878 69.806 4.2168 69.941C3.4508 71.395 3.4018 73.038 4.0778 74.568C5.1028 76.887 7.6498 78.714 12.5958 80.675C15.6728 81.895 18.4878 82.675 18.5128 82.682C22.5808 83.737 26.2598 84.273 29.4448 84.273C35.2988 84.273 39.4898 82.48 41.9018 78.944C45.7838 73.25 45.2288 68.042 40.2058 63.022C37.4258 60.244 35.5778 56.148 35.1928 55.249C34.4168 52.587 32.3648 49.628 28.9538 49.628H28.9528C28.6658 49.628 28.3758 49.651 28.0898 49.696C26.5958 49.931 25.2898 50.791 24.3568 52.085C23.3498 50.833 22.3718 49.837 21.4868 49.275C20.1528 48.429 18.8198 48 17.5238 48ZM17.5238 52C18.0338 52 18.6568 52.217 19.3438 52.653C21.4768 54.006 25.5928 61.081 27.0998 63.833C27.6048 64.755 28.4678 65.145 29.2448 65.145C30.7868 65.145 31.9908 63.612 29.3858 61.664C25.4688 58.733 26.8428 53.942 28.7128 53.647C28.7948 53.634 28.8758 53.628 28.9538 53.628C30.6538 53.628 31.4038 56.558 31.4038 56.558C31.4038 56.558 33.6018 62.078 37.3778 65.851C41.1538 69.625 41.3488 72.654 38.5968 76.69C36.7198 79.442 33.1268 80.273 29.4448 80.273C25.6258 80.273 21.7108 79.379 19.5168 78.81C19.4088 78.782 6.0658 75.013 7.7558 71.805C8.0398 71.266 8.5078 71.05 9.0968 71.05C11.4768 71.05 15.8058 74.592 17.6668 74.592C18.0828 74.592 18.3758 74.415 18.4958 73.983C19.2888 71.138 6.4388 69.942 7.5218 65.821C7.7128 65.092 8.2308 64.796 8.9588 64.797C12.1038 64.797 19.1598 70.328 20.6388 70.328C20.7518 70.328 20.8328 70.295 20.8768 70.225C21.6178 69.029 21.2118 68.194 15.9888 65.033C10.7658 61.871 7.0998 59.969 9.1848 57.699C9.4248 57.437 9.7648 57.321 10.1778 57.321C13.3488 57.322 20.8408 64.14 20.8408 64.14C20.8408 64.14 22.8628 66.243 24.0858 66.243C24.3668 66.243 24.6058 66.132 24.7678 65.858C25.6348 64.396 16.7148 57.636 16.2118 54.847C15.8708 52.957 16.4508 52 17.5238 52Z" fill="#FF9D0B"></path><path class="origin-bottom-right transition-transform group-hover:-rotate-6" d="M38.5967 76.6898C41.3487 72.6538 41.1537 69.6248 37.3777 65.8508C33.6017 62.0778 31.4037 56.5578 31.4037 56.5578C31.4037 56.5578 30.5827 53.3518 28.7127 53.6468C26.8427 53.9418 25.4697 58.7328 29.3867 61.6638C33.3037 64.5938 28.6067 66.5848 27.0997 63.8328C25.5927 61.0808 21.4777 54.0058 19.3437 52.6528C17.2107 51.2998 15.7087 52.0578 16.2117 54.8468C16.7147 57.6358 25.6357 64.3958 24.7677 65.8588C23.8997 67.3208 20.8407 64.1398 20.8407 64.1398C20.8407 64.1398 11.2687 55.4288 9.18465 57.6988C7.10065 59.9688 10.7657 61.8708 15.9887 65.0328C21.2127 68.1938 21.6177 69.0288 20.8767 70.2248C20.1347 71.4208 8.60465 61.6998 7.52165 65.8208C6.43965 69.9418 19.2887 71.1378 18.4957 73.9828C17.7027 76.8288 9.44465 68.5978 7.75565 71.8048C6.06565 75.0128 19.4087 78.7818 19.5167 78.8098C23.8267 79.9278 34.7727 82.2968 38.5967 76.6898Z" fill="#FFD21E"></path><path class="origin-bottom-left transition-transform group-hover:rotate-6" d="M77.3999 48C79.0189 48 80.4659 48.665 81.4749 49.871C82.0989 50.618 82.7509 51.822 82.8039 53.625C83.4829 53.43 84.1359 53.321 84.7459 53.321C86.2959 53.321 87.6959 53.915 88.6859 54.994C89.9579 56.379 90.5229 58.081 90.2769 59.784C90.1599 60.595 89.8889 61.322 89.4839 61.995C90.3379 62.686 90.9669 63.648 91.2709 64.805C91.5089 65.712 91.7529 67.601 90.4789 69.547C90.5599 69.674 90.6359 69.806 90.7069 69.941C91.4729 71.395 91.5219 73.038 90.8459 74.568C89.8209 76.887 87.2739 78.714 82.3279 80.675C79.2509 81.895 76.4359 82.675 76.4109 82.682C72.3429 83.737 68.6639 84.273 65.4789 84.273C59.6249 84.273 55.4339 82.48 53.0219 78.944C49.1399 73.25 49.6949 68.042 54.7179 63.022C57.4979 60.244 59.3459 56.148 59.7309 55.249C60.5069 52.587 62.5589 49.628 65.9699 49.628H65.9709C66.2579 49.628 66.5479 49.651 66.8339 49.696C68.3279 49.931 69.6339 50.791 70.5669 52.085C71.5739 50.833 72.5519 49.837 73.4369 49.275C74.7709 48.429 76.1039 48 77.3999 48ZM77.3999 52C76.8899 52 76.2669 52.217 75.5799 52.653C73.4469 54.006 69.3309 61.081 67.8239 63.833C67.3189 64.755 66.4559 65.145 65.6789 65.145C64.1369 65.145 62.9329 63.612 65.5379 61.664C69.4549 58.733 68.0809 53.942 66.2109 53.647C66.1289 53.634 66.0479 53.628 65.9699 53.628C64.2699 53.628 63.5199 56.558 63.5199 56.558C63.5199 56.558 61.3219 62.078 57.5459 65.851C53.7699 69.625 53.5749 72.654 56.3269 76.69C58.2039 79.442 61.7969 80.273 65.4789 80.273C69.2979 80.273 73.2129 79.379 75.4069 78.81C75.5149 78.782 88.8579 75.013 87.1679 71.805C86.8839 71.266 86.4159 71.05 85.8269 71.05C83.4469 71.05 79.1179 74.592 77.2569 74.592C76.8409 74.592 76.5479 74.415 76.4279 73.983C75.6349 71.138 88.4849 69.942 87.4019 65.821C87.2109 65.092 86.6929 64.796 85.9649 64.797C82.8199 64.797 75.7639 70.328 74.2849 70.328C74.1719 70.328 74.0909 70.295 74.0469 70.225C73.3059 69.029 73.7119 68.194 78.9349 65.033C84.1579 61.871 87.8239 59.969 85.7389 57.699C85.4989 57.437 85.1589 57.321 84.7459 57.321C81.5749 57.322 74.0829 64.14 74.0829 64.14C74.0829 64.14 72.0609 66.243 70.8379 66.243C70.5569 66.243 70.3179 66.132 70.1559 65.858C69.2889 64.396 78.2089 57.636 78.7119 54.847C79.0529 52.957 78.4729 52 77.3999 52Z" fill="#FF9D0B"></path><path class="origin-bottom-left transition-transform group-hover:rotate-6" d="M56.3271 76.6898C53.5751 72.6538 53.7701 69.6248 57.5461 65.8508C61.3221 62.0778 63.5201 56.5578 63.5201 56.5578C63.5201 56.5578 64.3411 53.3518 66.2111 53.6468C68.0811 53.9418 69.4541 58.7328 65.5371 61.6638C61.6201 64.5938 66.3171 66.5848 67.8241 63.8328C69.3311 61.0808 73.4461 54.0058 75.5801 52.6528C77.7131 51.2998 79.2151 52.0578 78.7121 54.8468C78.2091 57.6358 69.2881 64.3958 70.1561 65.8588C71.0241 67.3208 74.0831 64.1398 74.0831 64.1398C74.0831 64.1398 83.6551 55.4288 85.7391 57.6988C87.8231 59.9688 84.1581 61.8708 78.9351 65.0328C73.7111 68.1938 73.3061 69.0288 74.0471 70.2248C74.7891 71.4208 86.3191 61.6998 87.4021 65.8208C88.4841 69.9418 75.6351 71.1378 76.4281 73.9828C77.2211 76.8288 85.4791 68.5978 87.1681 71.8048C88.8581 75.0128 75.5151 78.7818 75.4071 78.8098C71.0971 79.9278 60.1511 82.2968 56.3271 76.6898Z" fill="#FFD21E"></path></svg></a> <div class="pt-6 font-semibold text-black md:hidden md:pt-0">Website</div> <a class="hover:underline" href="/models">Models</a> <a class="hover:underline" href="/datasets">Datasets</a> <a class="hover:underline" href="/spaces">Spaces</a> <a class="hover:underline" href="/pricing">Pricing</a> <a class="hover:underline" href="/docs">Docs</a></nav></footer></div> <script> import("\/front\/build\/kube-8645c4d\/index.js"); window.moonSha = "kube-8645c4d\/"; window.__hf_deferred = {}; </script> <!-- Stripe --> <script> if (["hf.co", "huggingface.co"].includes(window.location.hostname)) { const script = document.createElement("script"); script.src = "https://js.stripe.com/v3/"; script.async = true; document.head.appendChild(script); } </script> </body> </html>