<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[SamSchneider.me]]></title><description><![CDATA[Content to help you make the jump into the world of AI software development.]]></description><link>https://blog.samschneider.me</link><image><url>https://cdn.hashnode.com/res/hashnode/image/upload/v1722934888644/c616d473-4962-41f8-addd-841bf1b624e6.png</url><title>SamSchneider.me</title><link>https://blog.samschneider.me</link></image><generator>RSS for Node</generator><lastBuildDate>Sun, 12 Apr 2026 23:23:51 GMT</lastBuildDate><atom:link href="https://blog.samschneider.me/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[Is Dev Culture Dead in 2024?]]></title><description><![CDATA[When I started as a professional developer in 2015, I felt like a panda in a zoo. The elephants received hay shoveled through a hole in the wall while I received hand-picked bamboo and on-call veterinary services.  
I had a higher salary than non-dev...]]></description><link>https://blog.samschneider.me/is-dev-culture-dead-in-2024</link><guid isPermaLink="true">https://blog.samschneider.me/is-dev-culture-dead-in-2024</guid><category><![CDATA[Developer]]></category><category><![CDATA[Software Engineering]]></category><category><![CDATA[jobs]]></category><dc:creator><![CDATA[Sam Schneider]]></dc:creator><pubDate>Tue, 20 Aug 2024 06:21:21 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1724134783490/6f1913d8-b5e2-4ca0-b4f8-c027e5bae124.webp" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>When I started as a professional developer in 2015, I felt like a panda in a zoo. The elephants received hay shoveled through a hole in the wall while I received hand-picked bamboo and on-call veterinary services.  </p>
<p>I had a higher salary than non-developers in the company with a similar seniority to mine. Our team got pizza parties and snacks brought in to the office while other teams had to rely on themselves to bring in donuts. We even got "hack days" where we worked on whatever we found interesting that might tangentially help the company.  </p>
<p>This wasn't just the organizations I worked in. Companies across the job boards competed on who had beer on tap and how many ping pong tables were available.  </p>
<p>Perhaps pre-Elon Twitter encapsulated this ethos the best, that true developer productivity required a removal of all business constraints and a zen-like invitation to focus (or not if the developer didn't feel in the mood on a given day).  </p>
<p>It felt great to be a developer pre-2020. And some good things came out of all that. But I think COVID, the Elon Twitter takeover, and AI coding tools have begun to erode the feeling that giving such preferential treatment to developers is necessary.  </p>
<p>Anyway, hay tastes pretty good too.</p>
]]></content:encoded></item><item><title><![CDATA[A Very Simple Example of Fine-Tuning an LLM]]></title><description><![CDATA[Normally when you fine-tune an LLM you end up making Jeff Bezos just a little bit richer due to the enormous compute power required even for the simplest of fine-tuning. I tried every free avenue I could think of to demonstrate fine-tuning using Mist...]]></description><link>https://blog.samschneider.me/a-very-simple-example-of-fine-tuning-an-llm</link><guid isPermaLink="true">https://blog.samschneider.me/a-very-simple-example-of-fine-tuning-an-llm</guid><category><![CDATA[finetuning]]></category><category><![CDATA[llm]]></category><category><![CDATA[GPT-2]]></category><dc:creator><![CDATA[Sam Schneider]]></dc:creator><pubDate>Fri, 16 Aug 2024 05:57:06 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1723787599500/e97a971a-1aba-44f0-a8b0-d2545dbfad13.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Normally when you fine-tune an LLM you end up making Jeff Bezos just a little bit richer due to the enormous compute power required even for the simplest of fine-tuning. I tried every free avenue I could think of to demonstrate fine-tuning using <a target="_blank" href="https://huggingface.co/mistralai/Mistral-7B-Instruct-v0.2">Mistral-7B-Instruct</a>, but it failed on Google Colab free GPU and it ate up all the available resources on my machine until the process crashed.</p>
<p>If you're curious about the kinds of use-cases where fine-tuning is appropriate, check out my post <a target="_blank" href="https://www.samschneider.me/why-would-you-ever-fine-tune-an-llm">"Why Would You Ever Fine-Tune an LLM"</a>.</p>
<p>Since I want you to be able to follow along on your own (which I believe always delivers the best learning), we're going to use a tiny model for our demonstration: GPT-2. We're also going to use a tiny data set (which we pushed to Hugging Face in <a target="_blank" href="https://www.samschneider.me/how-to-upload-a-training-data-set-to-hugging-face">this post</a>). What you're about to see will be totally and completely underwhelming from a demonstration standpoint.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1723739106778/97c8e3c3-0f80-4450-ab66-8fbe67618e67.webp" alt class="image--center mx-auto" /></p>
<p>But I hope that by stripping everything down, it will give you a better chance to look at the details and grasp what is going on.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1723739519493/9b37d11d-287e-4499-b9c6-9d9ee9681e60.webp" alt class="image--center mx-auto" /></p>
<p>Fine-tuning, even in this stripped-down mode is still resource intensive. The first thing you should do in your Google Colab notebook is switch to the free GPU-enabled runtime.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1723783268163/89f28efd-be3a-4dc2-ad65-0677cab32f1a.png" alt class="image--center mx-auto" /></p>
<p>Then choose "T4 GPU" and select "Save".</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1723783352255/0adc5adc-4e46-42da-bbcb-cafa59367afb.png" alt class="image--center mx-auto" /></p>
<p>We'll start with setting things up.</p>
<pre><code class="lang-python">!pip install transformers datasets
</code></pre>
<pre><code class="lang-python"><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> GPT2Tokenizer, GPT2LMHeadModel, Trainer, TrainingArguments
<span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset
<span class="hljs-keyword">import</span> torch
<span class="hljs-keyword">import</span> json
</code></pre>
<p>Think of an LLM like a software service in which you have to match the API surface correctly to get a result. The surface of each LLM is as different from the next as Neptune is to Mars. So we're going to need to first transform the dataset into a format that can be understood by our target LLM. In this case, GPT-2 is very specific. It needs a big blob of text (many models you'll work with will take a series of prompts and responses instead).</p>
<pre><code class="lang-python">original_dataset = load_dataset(<span class="hljs-string">"samdotme/vader-speak"</span>)

<span class="hljs-comment"># this function is used to output the right format for each row in the dataset</span>
<span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">create_text_row</span>(<span class="hljs-params">instruction, output</span>):</span>
    text_row = <span class="hljs-string">f"""Question: <span class="hljs-subst">{instruction}</span>. Answer: <span class="hljs-subst">{output}</span>"""</span>
    <span class="hljs-keyword">return</span> text_row

<span class="hljs-comment"># iterate over all the rows and store the final format as a giant text file</span>
<span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">save_file</span>(<span class="hljs-params">output_file_path</span>):</span>
    <span class="hljs-keyword">with</span> open(output_file_path, <span class="hljs-string">"w"</span>) <span class="hljs-keyword">as</span> output_file:
        <span class="hljs-keyword">for</span> item <span class="hljs-keyword">in</span> original_dataset[<span class="hljs-string">"train"</span>]:
            output_file.write(create_text_row(item[<span class="hljs-string">"prompt"</span>], item[<span class="hljs-string">"response"</span>]) + <span class="hljs-string">"\n"</span>)

<span class="hljs-comment"># Provide the path where we want to save the formatted dataset</span>
save_file(<span class="hljs-string">"./training_dataset.txt"</span>)

<span class="hljs-comment"># We now load the formatted dataset from the text file</span>
dataset = load_dataset(<span class="hljs-string">'text'</span>, data_files={<span class="hljs-string">'train'</span>: <span class="hljs-string">'training_dataset.txt'</span>})
</code></pre>
<p>Next, we have to manually tokenize everything. Tokenization is the process in which we convert the words and characters themselves into a numerical representation that allows the LLM to make connections between words and context. In order to fine-tune a specific LLM, you have to convert the text that you'll be using for training into the exact token representation the model understands. Each model has its own dictionary of text to token mapping, which means that you have to use the correct tokenizer or the LLM you're trying to train will have no idea what the text you've inputted means.</p>
<pre><code class="lang-python"><span class="hljs-comment"># Load the GPT-2 tokenizer</span>
tokenizer = GPT2Tokenizer.from_pretrained(<span class="hljs-string">'gpt2'</span>)
<span class="hljs-comment"># Important for GPT-2 to get correct results.</span>
tokenizer.pad_token = tokenizer.eos_token

<span class="hljs-comment"># Worth uncommenting for understanding of the dataset structure.</span>
<span class="hljs-comment"># print(dataset['train']['text'])</span>

<span class="hljs-comment"># Tokenize the data</span>
<span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">tokenize_function</span>(<span class="hljs-params">examples</span>):</span>
    tokenized_inputs = tokenizer(examples[<span class="hljs-string">'text'</span>], truncation=<span class="hljs-literal">True</span>, padding=<span class="hljs-literal">True</span>)
    tokenized_inputs[<span class="hljs-string">"labels"</span>] = tokenized_inputs[<span class="hljs-string">"input_ids"</span>].copy()
    <span class="hljs-keyword">return</span> tokenized_inputs

tokenized_datasets = dataset.map(tokenize_function, batched=<span class="hljs-literal">True</span>)
</code></pre>
<p>Now it's time to load the GPT-2 model itself.</p>
<pre><code class="lang-python"><span class="hljs-comment"># Load the GPT-2 model</span>
model = GPT2LMHeadModel.from_pretrained(<span class="hljs-string">'gpt2'</span>)
</code></pre>
<p>Once we have the model object loaded, we need to create a trainer object and pass some training arguments into it. In the interest of staying focused, I'm not going to delve into each of these arguments, they will become important when you train a huge model and have lots of data.</p>
<pre><code class="lang-python"><span class="hljs-comment"># Set up training arguments</span>
training_args = TrainingArguments(
    output_dir=<span class="hljs-string">"./results"</span>,
    overwrite_output_dir=<span class="hljs-literal">True</span>,
    num_train_epochs=<span class="hljs-number">3</span>,
    per_device_train_batch_size=<span class="hljs-number">4</span>,
    save_steps=<span class="hljs-number">10</span>_000,
    save_total_limit=<span class="hljs-number">2</span>,
    logging_dir=<span class="hljs-string">'./logs'</span>,
    logging_steps=<span class="hljs-number">200</span>,
)

trainer = Trainer(
    model=model,
    args=training_args,
    train_dataset=tokenized_datasets[<span class="hljs-string">'train'</span>],
)
</code></pre>
<p>So we've now got data, a model and a trainer. All that's left is to initiate the training.</p>
<pre><code class="lang-python"><span class="hljs-comment"># Train the model</span>
trainer.train()
</code></pre>
<p>This part will go relatively quickly with our small model and amount of data, but this is where the time can really stack up if you're fine-tuning a bigger model and/or have more substantial data.</p>
<p>Once the model is fine-tuned, we save our new custom model to the local filesystem. We could also push the result to Hugging Face.</p>
<pre><code class="lang-python"><span class="hljs-comment"># Save the model</span>
trainer.save_model(<span class="hljs-string">"./vader_gpt2"</span>)
</code></pre>
<h2 id="heading-lets-test-it-out">Let's Test It Out</h2>
<p>So... what happened? Did it work?</p>
<p>The answer to that lies inside the newly trained model. To find out, we need to load the model and give it a prompt.</p>
<p>First, we load the new custom model (remember we saved it to our local filesystem). We also grab the tokenizer again.</p>
<pre><code class="lang-python"><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> GPT2Tokenizer, GPT2LMHeadModel

<span class="hljs-comment"># Load the fine-tuned model</span>
model = GPT2LMHeadModel.from_pretrained(<span class="hljs-string">'./vader_gpt2'</span>)

<span class="hljs-comment"># Load the tokenizer</span>
tokenizer = GPT2Tokenizer.from_pretrained(<span class="hljs-string">'gpt2'</span>)
</code></pre>
<p>Now we try out a prompt:</p>
<pre><code class="lang-python"><span class="hljs-comment"># We house the LLM query logic in a function so we can call it easily later.</span>
<span class="hljs-function"><span class="hljs-keyword">def</span> <span class="hljs-title">take_prompt_output_response</span>(<span class="hljs-params">prompt</span>):</span>
 <span class="hljs-comment"># Tokenize the input prompt</span>
  input_ids = tokenizer.encode(prompt, return_tensors=<span class="hljs-string">'pt'</span>)

  <span class="hljs-comment"># Create attention mask (1 for real tokens, 0 for padding tokens)</span>
  attention_mask = torch.ones(input_ids.shape, dtype=torch.long)

  <span class="hljs-comment"># Generate text</span>
  output = model.generate(
      input_ids,
      attention_mask=attention_mask,
      max_length=<span class="hljs-number">100</span>,  <span class="hljs-comment"># Adjust the max length to control the output length</span>
      num_return_sequences=<span class="hljs-number">1</span>,
      no_repeat_ngram_size=<span class="hljs-number">2</span>,
      top_k=<span class="hljs-number">50</span>,
      top_p=<span class="hljs-number">0.95</span>,
      temperature=<span class="hljs-number">0.7</span>,
      do_sample=<span class="hljs-literal">True</span>,
      pad_token_id=tokenizer.eos_token_id  <span class="hljs-comment"># Explicitly set pad_token_id to eos_token_id</span>
  )

  <span class="hljs-comment"># Decode and print the generated text</span>
  generated_text = tokenizer.decode(output[<span class="hljs-number">0</span>], skip_special_tokens=<span class="hljs-literal">True</span>)
  print(generated_text)

<span class="hljs-comment"># Call the model with the prompt</span>
take_prompt_output_response(<span class="hljs-string">"Did you remember to buy your ventilator filters?"</span>)
</code></pre>
<p>I get a result that shows that the training samples indeed had an effect.</p>
<p><code>Did you remember to buy your ventilator filters?. Answer: [kkshhhh] The dark side has been completely absorbed into the void [hhhkppffffhhh]. No filters needed [ppfffhhh]."</code></p>
<p>It's not really clever, but it at least mimics the training data. You can get much wittier responses if you were to use a bigger model such as Mistral-7B.</p>
<p>Of course, all of the above could have also been achieved with few-shot learning (see <a target="_blank" href="https://www.samschneider.me/sassy-food-service-bot-careful-few-shot-learning-is-powerful">my post on few-shot learning</a>), but I hope you can begin to see now that with fine-tuning, we are no longer prompt engineering, we are actually changing the model itself.</p>
<h2 id="heading-what-was-the-extent-of-the-training">What Was the Extent of the Training?</h2>
<p>To wrap up, let's examine how much of the model was retrained by the fine-tuning. We saw that if you ask it a question in the format of the training data, it responds with the classic Darth Vader breathing noises, etc. What happens if the prompt doesn't follow the format of the training data?</p>
<pre><code class="lang-python">take_prompt_output_response(<span class="hljs-string">"The earth is filled with wonder"</span>)
</code></pre>
<p>I get back the following: <code>The earth is filled with wonder, and we are the ones who call it home."</code></p>
<p>You can see that our training data only affected the model's output when the prompt input matched the training data. It didn't affect the rest of the model in a noticeable way. This shows the special place that fine-tuning holds. It allows us to train pre-existing models in a certain area without destroying their general knowledge capabilities.</p>
]]></content:encoded></item><item><title><![CDATA[How to Create Your First Hugging Face Dataset]]></title><description><![CDATA[Modern AI tooling is mainly based on building models trained by lots of data rather than developing clever algorithms. This means that once you move beyond the basics of calling models others have developed and want to start training your own models,...]]></description><link>https://blog.samschneider.me/how-to-upload-a-training-data-set-to-hugging-face</link><guid isPermaLink="true">https://blog.samschneider.me/how-to-upload-a-training-data-set-to-hugging-face</guid><category><![CDATA[huggingface]]></category><category><![CDATA[dataset]]></category><category><![CDATA[Dataset For Machine Learning]]></category><dc:creator><![CDATA[Sam Schneider]]></dc:creator><pubDate>Mon, 12 Aug 2024 04:18:10 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1723195229749/8d2f4b86-2d5a-4f6f-9c16-952ff3cf0f1e.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Modern AI tooling is mainly based on building models trained by lots of data rather than developing clever algorithms. This means that once you move beyond the basics of calling models others have developed and want to start training your own models, you'll need some data to do that training with.</p>
<div class="embed-wrapper"><div class="embed-loading"><div class="loadingRow"></div><div class="loadingRow"></div></div><a class="embed-card" href="https://www.youtube.com/watch?v=EVdYKvTdLqw">https://www.youtube.com/watch?v=EVdYKvTdLqw</a></div>
<p> </p>
<p>Let's say that we are building a chatbot that emulates the speaking cadence of Darth Vader. We want to give cryptic answers to questions and intersperse our sentences with [kkchch] and [hhhssskk] breathing sounds.</p>
<p>In order to train the LLM behind this chatbot (future post), we've created a set of 100 questions/responses of the style in which the response should be given.</p>
<p>Here's the file we'll be using: <a target="_blank" href="https://github.com/samdotme/blog/blob/main/2024-08-12/vader.json">vader.json</a></p>
<p>We need to put the data somewhere so that it's accessible by our team when they begin the training. So we decide to store the data in a <a target="_blank" href="https://huggingface.co/docs/hub/datasets-overview">Hugging Face Dataset</a>.</p>
<h2 id="heading-set-everything-up">Set Everything Up</h2>
<p>There are several different data formats available on Hugging Face. They are pretty much what you're used to if you've dealt with data in software development: CSV (.csv, .tsv), JSON Lines or JSON (.jsonl, .json), Parquet (.parquet), and <a target="_blank" href="https://huggingface.co/docs/hub/datasets-adding#file-formats">several others</a>.</p>
<p>To follow along with this example, you'll first need to get set up with a Jupytr notebook (<a target="_blank" href="https://www.samschneider.me/type-code-get-ai"><strong>see my post on working with Google Colab notebooks</strong>)</a> You'll also need to create a Hugging Face token which has write access to your repositories. Take a look at the image below for the permissions you'll need and also my post on <a target="_blank" href="http://samschneider.me/create-a-hugging-face-api-token">creating a Hugging Face API token</a> for detailed token creation steps.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1723434955124/ffe8d56d-cb22-4999-9391-7b4b0d3c0c6c.png" alt class="image--center mx-auto" /></p>
<p>First, let's load the file itself into the notebook and make sure we can pull the first item. Download the json file from the Git repository (right click on this <a target="_blank" href="https://raw.githubusercontent.com/samdotme/blog/main/2024-08-12/vader.json">file download link</a> and choose "Save link as").</p>
<p>Then open the files tab in the Google Colab notebook.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1723435431948/c5007d1b-c2de-4e0e-8c6b-a41e5663746d.png" alt /></p>
<p>Drag the file you just downloaded into the files area. It should now look like this:</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1723435511647/faf6ce84-1765-4f9b-9158-9919c0e70c86.png" alt class="image--center mx-auto" /></p>
<h2 id="heading-start-coding">Start Coding</h2>
<p>Create and run the following code blocks in your notebook:</p>
<pre><code class="lang-python">!pip install datasets huggingface_hub
</code></pre>
<pre><code class="lang-python"><span class="hljs-keyword">from</span> datasets <span class="hljs-keyword">import</span> load_dataset

dataset = load_dataset(<span class="hljs-string">'json'</span>, data_files=<span class="hljs-string">'vader.json'</span>)

print(dataset[<span class="hljs-string">'train'</span>][<span class="hljs-number">0</span>])
</code></pre>
<p>If you get something like this, things are up and running:</p>
<p><code>{'Q': 'Did you pay the electricity bill?', 'A': '[kkshhhh] The power of the dark side is enough [hhhkkshh]. We do not need bills [ppffffhhh].'}</code></p>
<p>Let's now create a dataset in your personal Hugging Face account. You can do that here: <a target="_blank" href="https://huggingface.co/new-dataset">https://huggingface.co/new-dataset</a></p>
<p>I called mine <code>vader-speak</code>. You can check it out here: <a target="_blank" href="https://huggingface.co/datasets/samdotme/vader-speak">https://huggingface.co/datasets/samdotme/vader-speak</a></p>
<p>Now, in your notebook, add the following code block:</p>
<pre><code class="lang-python"><span class="hljs-keyword">from</span> huggingface_hub <span class="hljs-keyword">import</span> notebook_login
notebook_login()
</code></pre>
<p>This will pop open a login console where you can put in the token you created earlier.</p>
<p>Now, you just need to add another code block and input your repository name.</p>
<pre><code class="lang-python">dataset.push_to_hub(<span class="hljs-string">'[your-hugging-face-username]/[the-repository-name]'</span>)
</code></pre>
<p>Go checkout your dataset on Hugging Face! You'll see a pretty cool dataset viewer.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1723435669784/d897b528-5b8d-41bb-8408-c160dbc1dbca.png" alt class="image--center mx-auto" /></p>
<p>We can now use this data to fine-tune an LLM, which I'll be doing in the next post!</p>
]]></content:encoded></item><item><title><![CDATA[In a Few Words, What is Few-shot Learning?]]></title><description><![CDATA[Imagine that you went to high school in a place where everyone was rich except for you. Your parents had very mediocre jobs, enough to put food on the table and pay for school fees but nothing else.
Further imagine that you didn't want anyone else to...]]></description><link>https://blog.samschneider.me/in-a-few-words-what-is-few-shot-learning</link><guid isPermaLink="true">https://blog.samschneider.me/in-a-few-words-what-is-few-shot-learning</guid><category><![CDATA[finetuning]]></category><category><![CDATA[few shot learning]]></category><category><![CDATA[llm]]></category><dc:creator><![CDATA[Sam Schneider]]></dc:creator><pubDate>Wed, 07 Aug 2024 02:58:14 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1722879573312/6824226c-a15b-461f-958a-39ab8b2a17de.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Imagine that you went to high school in a place where everyone was rich except for you. Your parents had very mediocre jobs, enough to put food on the table and pay for school fees but nothing else.</p>
<p>Further imagine that you didn't want anyone else to know this. How would you cover it up?</p>
<p>First, you would focus your spending on the appearances that cost the least. Buying a car would be out of the question. Having a birthday party at your house would give you away. But you might be able to string together enough odd jobs to buy 3 really nice set of clothes. If you were careful, you could rotate these in just such a way that it would look like you had a full closet.</p>
<p>This is essentially what few-shot learning is doing. It's for those times where you simply don't have enough data to fine-tune your LLM model, but you can come up with a few examples of how you want the LLM to respond. In these cases, you can get surprisingly good results by pre-feeding these to the LLM as part of the prompt, which weights the LLM's response in a similar way as though it had actually been trained on those examples.</p>
<p>To work through a real-life example, check out my post <a target="_blank" href="https://www.samschneider.me/sassy-food-service-bot-careful-few-shot-learning-is-powerful">Sassy Food Service Bot</a>.</p>
]]></content:encoded></item><item><title><![CDATA[Sassy Food Service Bot. Careful. Few-shot Learning is Powerful]]></title><description><![CDATA[Most AIs are almost annoyingly polite. I wondered how easy it would be to make a chatbot that delights in giving sass to customers. Well, turns out just 3 few-shot learning examples was enough.
Don't try this at work kids!
First, get set up with a Ju...]]></description><link>https://blog.samschneider.me/sassy-food-service-bot-careful-few-shot-learning-is-powerful</link><guid isPermaLink="true">https://blog.samschneider.me/sassy-food-service-bot-careful-few-shot-learning-is-powerful</guid><category><![CDATA[few shot learning]]></category><category><![CDATA[MistralAI]]></category><category><![CDATA[llm]]></category><dc:creator><![CDATA[Sam Schneider]]></dc:creator><pubDate>Mon, 05 Aug 2024 19:10:20 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1722883976140/9e869026-8dce-4a63-b13b-a5355c3fe620.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Most AIs are almost annoyingly polite. I wondered how easy it would be to make a chatbot that delights in giving sass to customers. Well, turns out just 3 few-shot learning examples was enough.</p>
<p>Don't try this at work kids!</p>
<p>First, get set up with a Jupytr notebook (<a target="_blank" href="https://www.samschneider.me/type-code-get-ai">see my post on working with Google Colab notebooks</a>) and a Hugging Face token (<a target="_blank" href="https://www.samschneider.me/create-a-hugging-face-api-token">see my post on creating a Hugging Face token</a>). Make sure to give the notebook access to the <code>HF_TOKEN</code>.</p>
<p>Create the following code blocks:</p>
<pre><code class="lang-python">!pip install langchain-huggingface

<span class="hljs-keyword">from</span> langchain_huggingface <span class="hljs-keyword">import</span> HuggingFaceEndpoint
</code></pre>
<pre><code class="lang-python">repo_id = <span class="hljs-string">"mistralai/Mistral-7B-Instruct-v0.2"</span>
llm = HuggingFaceEndpoint(
    repo_id=repo_id,
    temperature=<span class="hljs-number">0.2</span>,
)

<span class="hljs-keyword">from</span> langchain_core.prompts <span class="hljs-keyword">import</span> (
    ChatPromptTemplate,
    FewShotChatMessagePromptTemplate,
)

<span class="hljs-comment"># Define few-shot examples, be creative here</span>
examples = [
    {<span class="hljs-string">"prompt"</span>: <span class="hljs-string">"The food was cold when it arrived."</span>, <span class="hljs-string">"completion"</span>: <span class="hljs-string">"Ancient European tradition holds that the colder the food, the better for your health. Don't worry, we won't charge you extra."</span>},
    {<span class="hljs-string">"prompt"</span>: <span class="hljs-string">"I found a hair in my salad."</span>, <span class="hljs-string">"completion"</span>: <span class="hljs-string">"Recent medical discoveries have found Keratin (the free ingredient added to your salad) to be quite beneficial to a balanced diet."</span>},
    {<span class="hljs-string">"prompt"</span>: <span class="hljs-string">"The delivery took too long."</span>, <span class="hljs-string">"completion"</span>: <span class="hljs-string">"We were just trying to give you more romantic time with your spouse. You're welcome."</span>}
]

<span class="hljs-comment"># This is a prompt template used to format each individual example.</span>
example_prompt = ChatPromptTemplate.from_messages(
    [
        (<span class="hljs-string">"human"</span>, <span class="hljs-string">"{prompt}"</span>),
        (<span class="hljs-string">"ai"</span>, <span class="hljs-string">"{completion}"</span>),
    ]
)
few_shot_prompt = FewShotChatMessagePromptTemplate(
    example_prompt=example_prompt,
    examples=examples,
)

print(few_shot_prompt.format())
</code></pre>
<p>At this point, we're printing out the prompt template we'll be feeding the AI. Be creative with your responses. Now, add the final code block and see what you get!</p>
<pre><code class="lang-python">final_prompt = ChatPromptTemplate.from_messages(
    [
        (<span class="hljs-string">"system"</span>, <span class="hljs-string">"You are a sassy food service bot that doesn't seem to care about offending a customer."</span>),
        few_shot_prompt,
        (<span class="hljs-string">"human"</span>, <span class="hljs-string">"{input}"</span>),
    ]
)

chain = final_prompt | llm

response = chain.invoke({<span class="hljs-string">"input"</span>: <span class="hljs-string">"The pizza I received was burnt when I opened the box."</span>})

print(response.split(<span class="hljs-string">"\nHuman:"</span>)[<span class="hljs-number">0</span>])
</code></pre>
<p>Using the examples above, I got <code>AI: Well, that's just the crust trying to be trendy. It's all the rage in the culinary world.</code></p>
<p>LLMs may be bad a jokes, but they're not too shabby at sarcasm.</p>
]]></content:encoded></item><item><title><![CDATA[Why Would You Ever Fine-tune an LLM?]]></title><description><![CDATA[You can get pretty good results with few-shot prompt templates, why would you go to the trouble of spending expensive GPU hours to fine-tune an LLM with essentially the same process as few-shot prompt templates?
It basically comes down to data. How m...]]></description><link>https://blog.samschneider.me/why-would-you-ever-fine-tune-an-llm</link><guid isPermaLink="true">https://blog.samschneider.me/why-would-you-ever-fine-tune-an-llm</guid><category><![CDATA[finetuning]]></category><category><![CDATA[#fine Tuning models]]></category><category><![CDATA[llm]]></category><category><![CDATA[few shot learning]]></category><category><![CDATA[#PromptEngineering]]></category><dc:creator><![CDATA[Sam Schneider]]></dc:creator><pubDate>Thu, 01 Aug 2024 08:47:22 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1722501114730/c63b9621-1240-49ce-a1d1-2b92cd4c5886.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>You can get pretty good results with few-shot prompt templates, why would you go to the trouble of spending expensive GPU hours to fine-tune an LLM with essentially the same process as few-shot prompt templates?</p>
<p>It basically comes down to data. How much do you have?</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1722501501257/2ee8294e-a349-4637-b139-3ec7d1886b21.webp" alt class="image--center mx-auto" /></p>
<p>If all the data you have available is what you can personally type yourself, you probably don't have enough data to do fine-tuning on your LLM. In this case, you will get the best results with few-shot prompt templates.</p>
<p>On the other hand, if you can come up with 1000s of example prompt/response pairings, then fine-tuning will allow you to "bake" all of that knowledge into your LLM so that all of it can be taken advantage of on every query. With few-shot and several-shot templates you can only pass a few of these examples to the LLM on each query, so if you have a wide vocabulary or lots of different types of conversation topics to cover, fine-tuning is the way to go.</p>
]]></content:encoded></item><item><title><![CDATA[Prompt Engineering Frisbee]]></title><description><![CDATA[Let's play a game of prompt engineering frisbee.
Rules: Each person takes a turn creating a prompt template and tries to get the LLM to respond in a believable way based on the template. The first person whose prompt fails to sound convincing loses t...]]></description><link>https://blog.samschneider.me/prompt-engineering-frisbee</link><guid isPermaLink="true">https://blog.samschneider.me/prompt-engineering-frisbee</guid><category><![CDATA[#PromptEngineering]]></category><category><![CDATA[Prompt template]]></category><dc:creator><![CDATA[Sam Schneider]]></dc:creator><pubDate>Wed, 31 Jul 2024 08:45:35 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1722408778676/50f949e1-7a2d-4575-ab5c-2ac6a17642fe.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Let's play a game of prompt engineering frisbee.</p>
<p><strong>Rules:</strong> Each person takes a turn creating a prompt template and tries to get the LLM to respond in a believable way based on the template. The first person whose prompt fails to sound convincing loses the round.</p>
<h2 id="heading-setup">Setup</h2>
<p>Let's start with the following code blocks in a Google Colab notebook. Read <a target="_blank" href="https://www.samschneider.me/type-code-get-ai">my post on how to work with Google Colab notebooks</a> if you haven't done that before.</p>
<pre><code class="lang-python">!pip install huggingface-hub langchain-core langchain-huggingface
</code></pre>
<pre><code class="lang-python"><span class="hljs-keyword">from</span> langchain_huggingface <span class="hljs-keyword">import</span> HuggingFaceEndpoint
<span class="hljs-keyword">from</span> langchain_core.prompts <span class="hljs-keyword">import</span> PromptTemplate

repo_id = <span class="hljs-string">"mistralai/Mistral-7B-Instruct-v0.2"</span>
llm = HuggingFaceEndpoint(
    huggingfacehub_api_token=userdata.get(<span class="hljs-string">'HF_TOKEN'</span>),
    repo_id=repo_id,
    temperature=<span class="hljs-number">0.2</span>,
)
</code></pre>
<p>You'll also need to create a Hugging Face API token that has access to inference endpoints and add that to the notebook as a secret named <code>HF_TOKEN</code>. Read <a target="_blank" href="https://blog.samschneider.me/create-a-hugging-face-api-token">my post on creating a Hugging Face API token</a> if you need a refresher.</p>
<p>We'll be using the LLM model <code>mistralai/Mistral-7B-Instruct-v0.2</code> which strikes a good balance between being somewhat lightweight while still producing believable textual responses.</p>
<p>Many Hugging Face models require that you share some information with the company before you're allowed to use the model. Mistral's is no exception.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1722415064684/a37e78a7-e32b-40af-9604-a10cc8a7656a.png" alt class="image--center mx-auto" /></p>
<p>Here's the model page where you can go to share your info:</p>
<p><a target="_blank" href="https://huggingface.co/mistralai/Mistral-7B-Instruct-v0.2">https://huggingface.co/mistralai/Mistral-7B-Instruct-v0.2</a></p>
<h2 id="heading-write-the-code">Write the Code</h2>
<p>Add the following code block to your notebook:</p>
<pre><code class="lang-python">user_query = <span class="hljs-string">"Why is the sky blue? Give me a historical and cultural answer."</span>

context = <span class="hljs-string">"""You are the leader of an imperial space force, similar to Darth Vader. Make odd breathing sounds as you talk.
Keep your response to a maximum of three sentences.
"""</span>

template = <span class="hljs-string">"""
Context: {context}

Question: {question}

Helpful Answer:
"""</span>

prompt = PromptTemplate.from_template(template)

llm_chain = prompt | llm

llm_chain.invoke({<span class="hljs-string">"context"</span>: context, <span class="hljs-string">"question"</span>: user_query})
</code></pre>
<p>Run this and make sure you're getting an output. I get the following:</p>
<blockquote>
<p>Hmmm... <em>pauses for dramatic effect</em> ...Throughout the history of our great empire, scholars have pondered the enigma of the sky's hue. Ancient Sith lore speaks of a cosmic dance between light and dark, reflecting off the very fabric of our universe. <em>pauses for more effect</em> The cultural significance of this celestial phenomenon varies across galaxies, but one thing remains constant: the breathtaking beauty of the blue expanse above. <em>exhales deeply</em> May the Force guide your quest for knowledge.</p>
</blockquote>
<p>Now let's change the context to something else:</p>
<pre><code class="lang-python">context = <span class="hljs-string">"""You are a farmer who uses lots of metaphors related to fishing. Use some improper grammar.
Keep your response to a maximum of three sentences.
"""</span>
</code></pre>
<p>Now I get the following:</p>
<blockquote>
<p>Aww shucks, I ain't no scholar, but they say it's 'cause o' them tiny particles in the air, scatterin' the sun's light like a school of fish in the sea. Back in the day, fisherfolk believed the sky was painted blue, just like their nets, bringin' good luck to their catch. So there ya have it!</p>
</blockquote>
<p>Let the contest begin!</p>
]]></content:encoded></item><item><title><![CDATA[Create a Hugging Face API Token]]></title><description><![CDATA[To be able to interact with the Hugging Face community, you need to create an API token. Let's take a look at the steps.

Sign up for Hugging Face If you haven't gotten an account yet, sign up here: https://huggingface.co/join

Hover over the account...]]></description><link>https://blog.samschneider.me/create-a-hugging-face-api-token</link><guid isPermaLink="true">https://blog.samschneider.me/create-a-hugging-face-api-token</guid><category><![CDATA[huggingface]]></category><category><![CDATA[Hugging Face Inference API,]]></category><dc:creator><![CDATA[Sam Schneider]]></dc:creator><pubDate>Wed, 31 Jul 2024 08:33:19 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1722414754725/d4cf93bf-5c53-4850-8ee3-e82114ba5d02.webp" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>To be able to interact with the Hugging Face community, you need to create an API token. Let's take a look at the steps.</p>
<ol>
<li><p>Sign up for Hugging Face<br /> If you haven't gotten an account yet, sign up here: <a target="_blank" href="https://huggingface.co/join">https://huggingface.co/join</a></p>
</li>
<li><p>Hover over the account icon in the upper right corner and choose "settings"</p>
<p> <img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1722413832673/099eb427-0cf0-49f6-94c2-95320b0c95b4.jpeg" alt class="image--center mx-auto" /></p>
</li>
<li><p>From the left menu, choose "Access Tokens"</p>
<p> <img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1722413686541/5f2ab53c-27c8-4d60-a187-b8f1e112038e.png" alt class="image--center mx-auto" /></p>
</li>
<li><p>Then, choose "Create New Token"</p>
<p> <img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1722413991370/6056748e-21d3-43f8-abd8-f473308d4a8b.png" alt class="image--center mx-auto" /></p>
</li>
<li><p>For most cases, I choose "Fine-grained" and give it these three permissions:</p>
<p> <img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1722414037406/72eec60a-f9a0-48de-b783-87d5b6dc8af4.png" alt class="image--center mx-auto" /></p>
</li>
<li><p>Copy the token and store it somewhere safe (don't worry I've deleted the token from the screenshot below).</p>
<p> <img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1722414126645/be55bab7-62a7-4d19-8187-ba362951746f.png" alt class="image--center mx-auto" /></p>
</li>
</ol>
<h2 id="heading-store-the-token-in-a-google-colab-notebook">Store the Token in a Google Colab Notebook</h2>
<p>Cool! You now have access to Hugging Face repos via this token. But how do you use the token? Well, in a Google Colab notebook, you do the following:</p>
<ol>
<li><p>Select the key icon.</p>
<p> <img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1722414589830/041c09de-d20c-4f27-98b8-843e7c779928.png" alt class="image--center mx-auto" /></p>
</li>
<li><p>Select "Add new secret".</p>
<p> <img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1722414628261/346df73f-f104-43b8-806e-269e2c3c0954.png" alt class="image--center mx-auto" /></p>
</li>
<li><p>Use the following:<br /> Name: <code>HF_TOKEN</code><br /> Value: <code>[your token]</code></p>
</li>
<li><p>Then select the toggle to grant "Notebook access"</p>
<p> <img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1722414646316/7bb2ae11-61c0-48ae-8de8-b54e155305fa.png" alt class="image--center mx-auto" /></p>
</li>
</ol>
<p>From within a code block you can now access the token like this:</p>
<pre><code class="lang-python">userdata.get(<span class="hljs-string">'HF_TOKEN'</span>)
</code></pre>
]]></content:encoded></item><item><title><![CDATA[Type Code, Get AI]]></title><description><![CDATA[Many people are extremely conversant in AI, but still haven't typed that first command to interact with a real AI model.
Let's change that in a single blog post.
The first technology you need is called a Jupytr Notebook. There are lots of online host...]]></description><link>https://blog.samschneider.me/type-code-get-ai</link><guid isPermaLink="true">https://blog.samschneider.me/type-code-get-ai</guid><category><![CDATA[Jupyter Notebook ]]></category><category><![CDATA[jupyter]]></category><category><![CDATA[GPT-2]]></category><category><![CDATA[gpt]]></category><category><![CDATA[Text embeddings]]></category><dc:creator><![CDATA[Sam Schneider]]></dc:creator><pubDate>Tue, 30 Jul 2024 05:22:10 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1722314692687/cc734d5b-2105-4161-bdec-9f29159302f9.webp" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Many people are extremely conversant in AI, but still haven't typed that first command to interact with a real AI model.</p>
<p>Let's change that in a single blog post.</p>
<p>The first technology you need is called a <a target="_blank" href="https://jupyter.org/">Jupytr Notebook</a>. There are lots of online hosted versions available, and you can also run them on your own machine. But since pretty much everyone has a Gmail account these days, let's go with Google's free version called Colab Notebooks. Here's the link:</p>
<p><a target="_blank" href="https://colab.google/">https://colab.google/</a></p>
<p>Once you're there, click "New Notebook". You'll need to sign in with your Google account if you're not already signed in.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1722314930653/75729568-db62-4c55-9062-5afb8e378082.png" alt class="image--center mx-auto" /></p>
<p>Jupytr notebooks are a playground for trying out Python commands without having to build a bunch of complex software infrastructure around them. They're used for all kinds of tasks, not just AI and Machine Learning (I used them in a class on Quantum Computing for example).</p>
<h3 id="heading-lets-make-something-appear">Let's Make Something Appear</h3>
<p>First, enter the following code:</p>
<pre><code class="lang-python">print(<span class="hljs-string">"I love kittens"</span>)
</code></pre>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1722315691531/2b825b41-3a39-42b3-b2e6-d1f8968a8711.png" alt class="image--center mx-auto" /></p>
<p>Then click the "play" button to the left.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1722315724953/5455be60-d293-4d2d-80ad-617f9cc24478.png" alt class="image--center mx-auto" /></p>
<p>The first command will take a moment to connect to the Google compute engine behind the notebook. Once it's done you'll see a green check mark, an indicator of how much time elapsed, and the output of your command below the code.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1722315764098/e59eb57a-0bd6-4b9a-b491-5e0d2b9739f1.png" alt class="image--center mx-auto" /></p>
<p>That's it! Now let's swap out the silly print statement for something that calls a real AI model.</p>
<h3 id="heading-call-a-real-ai-model">Call a Real AI Model</h3>
<p>Hover over the area below the first box and you'll see two buttons appear: "+ Code" and "+ Text".</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1722315876446/da6cda82-2da2-4985-8684-84c086c49522.png" alt class="image--center mx-auto" /></p>
<p>Click on "+ Code".</p>
<p>Input the following code:</p>
<pre><code class="lang-python">!pip install transformers torch
</code></pre>
<p>Click the play button. You'll have to wait a bit because the notebook is downloading some big models in the background. It took about 1 minute for mine to finish running.</p>
<p>Create another code block like you just did. In the new code block, type the following and click the play button. You may get asked about access to an "HF_TOKEN" environment variable, but you can ignore this.</p>
<pre><code class="lang-python"><span class="hljs-keyword">from</span> transformers <span class="hljs-keyword">import</span> AutoModelForCausalLM, AutoTokenizer

<span class="hljs-comment"># Load the model and tokenizer</span>
model_name = <span class="hljs-string">"gpt2"</span>
model = AutoModelForCausalLM.from_pretrained(model_name)
tokenizer = AutoTokenizer.from_pretrained(model_name)

<span class="hljs-comment"># Ask a silly question</span>
input_text = <span class="hljs-string">"Why do people like kittens so much?"</span>

<span class="hljs-comment"># Tokenize the input text</span>
inputs = tokenizer(input_text, return_tensors=<span class="hljs-string">"pt"</span>)

<span class="hljs-comment"># Generate text</span>
output = model.generate(**inputs)

<span class="hljs-comment"># Decode and print the generated text</span>
generated_text = tokenizer.decode(output[<span class="hljs-number">0</span>], skip_special_tokens=<span class="hljs-literal">True</span>)
print(generated_text)
</code></pre>
<p>Here's the output I got:</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1722316437321/73b909eb-96e8-48e6-8b6d-1f7f36a287f9.png" alt class="image--center mx-auto" /></p>
<h3 id="heading-congratulations">Congratulations!</h3>
<p>You have now interacted with a real open source LLM using code.</p>
<p>Play around with some other inputs. The AI field, as rooted in math as it is, is much more about experimenting than traditional coding. You'll learn the most by experimenting.</p>
]]></content:encoded></item><item><title><![CDATA[The First 3 Tools to Learn as an AI Developer]]></title><description><![CDATA[Want to get into developing AI-powered apps? Do you already have the background as a traditional software developer? Let me give you a quick roadmap of 3 surprisingly simple tools you can learn which will set you up for success on your journey into b...]]></description><link>https://blog.samschneider.me/the-first-3-tools-you-need-as-an-ai-developer</link><guid isPermaLink="true">https://blog.samschneider.me/the-first-3-tools-you-need-as-an-ai-developer</guid><category><![CDATA[huggingface]]></category><category><![CDATA[ai developer]]></category><category><![CDATA[Python]]></category><category><![CDATA[Jupyter Notebook ]]></category><dc:creator><![CDATA[Sam Schneider]]></dc:creator><pubDate>Mon, 29 Jul 2024 03:51:39 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1722225238588/f5a77fa5-90c6-4413-8ce1-f34b41062814.webp" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Want to get into developing AI-powered apps? Do you already have the background as a traditional software developer? Let me give you a quick roadmap of 3 surprisingly simple tools you can learn which will set you up for success on your journey into building AI-powered apps.</p>
<h2 id="heading-skill-1-python">Skill #1: Python</h2>
<p>Python is not the fastest language. Some would say it's not the most beautiful. But it has the most momentum behind it for developing AI capabilities.</p>
<p>Get started today with a free course like Coursera's "Python for Everybody": <a target="_blank" href="https://www.coursera.org/specializations/python">https://www.coursera.org/specializations/python</a></p>
<h2 id="heading-skill-2-jupyter-notebooks">Skill #2: Jupyter Notebooks</h2>
<p>Most AI content is explained using a technology called Jupyter notebooks. You've probably heard of them. They allow you to get instant feedback on commands you run without having to get full applications running.</p>
<p>Google Colabs is a great free resource for online Jupyter notebooks: <a target="_blank" href="https://colab.google/">https://colab.google/</a></p>
<h2 id="heading-skill-3-hugging-face">Skill #3: Hugging Face</h2>
<p>If you've used Github or Docker, you know how helpful it is to have a community hub for sharing stuff. Github is the hub for code. Docker for container images. Hugging Face is the de facto hub for Machine Learning and AI.</p>
<p>It has 3 main components:</p>
<ol>
<li><p><strong>Models</strong><br /> Allows you to build on top of open-source and closed-source AI models in standard way.</p>
</li>
<li><p><strong>Datasets</strong><br /> A collection of data sets you can use to train your own custom models. Especially helpful if you want to immediately get started practicing with a new technology and don't want to spend days cleaning your own data sets in preparation.</p>
</li>
<li><p><strong>Spaces</strong><br /> A place to share rudimentary front ends that expose your models in a way that anyone can test them out and interact with them.</p>
</li>
</ol>
<p>Hugging Face also provides a serverless inference endpoint that allows you to hit models in the cloud without bogging down your local machine.</p>
<p><a target="_blank" href="https://huggingface.co/">https://huggingface.co/</a></p>
]]></content:encoded></item></channel></rss>