<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="3.10.0">Jekyll</generator><link href="http://www.bertforhumanists.org//feed.xml" rel="self" type="application/atom+xml" /><link href="http://www.bertforhumanists.org//" rel="alternate" type="text/html" /><updated>2026-06-15T20:54:47+00:00</updated><id>http://www.bertforhumanists.org//feed.xml</id><title type="html">AI for Humanists</title><subtitle>The AI for Humanists project is developing resources to enable DH scholars to explore how large language models and AI technologies can be used in their research and teaching. Find an annotated bibliography of research papers and tools, a glossary of relevant terms, code tutorials, and information about our workshops.</subtitle><entry><title type="html">Watch out for confirmation bias</title><link href="http://www.bertforhumanists.org//in-context%20learning/confirmation/" rel="alternate" type="text/html" title="Watch out for confirmation bias" /><published>2024-07-11T00:00:00+00:00</published><updated>2024-07-11T00:00:00+00:00</updated><id>http://www.bertforhumanists.org//in-context%20learning/confirmation</id><content type="html" xml:base="http://www.bertforhumanists.org//in-context%20learning/confirmation/"><![CDATA[<p>This afternoon I was at a presentation by the Cornell Digital Humanities Summer Fellows. Afterwards, I was talking analysis of poetic forms, and pulled out my laptop to try something out.</p>

<p>There are good reasons to think that this task would be extremely difficult. Language models are amazing in many ways, but two things that they struggle with are <em>counting</em> and <em>meta-knowledge about words</em>. They see many words in sequence, but internally they represent them as whole words or sub words that have been mapped to integers. They never <em>hear</em> language, so concepts like rhyme, syllables, or starting letters are so difficult even though to us they seem natural.</p>

<p>So I wanted to ask the newest most powerful model about a line of poetry that it has never seen. Since I happened to have my foot on a chair, I came up with this not-quite grammatical example. I passed it to <a href="https://claude.ai">Claude</a>.</p>

<blockquote>
  <p>What is the poetic meter of the following line? 
the chair on which I set my foot upon</p>
</blockquote>

<p>The response was surprisingly good! It correctly identifies this as iambic pentameter, marks the stress pattern with CAPS, provides a scansion, and defines some key terms.</p>

<blockquote>
  <p>To analyze the poetic meter of this line, let’s break it down into syllables and stress patterns:</p>

  <p>the CHAIR on WHICH I SET my FOOT u-PON</p>

  <p>This line has 10 syllables with alternating unstressed and stressed syllables. The pattern is:</p>

  <p>unstressed - stressed - unstressed - stressed - unstressed - stressed - unstressed - stressed - unstressed - stressed</p>

  <p>This metrical pattern is known as iambic pentameter. Here’s why:</p>

  <ol>
    <li>Iambic: An iamb is a metrical foot consisting of an unstressed syllable followed by a stressed syllable.</li>
    <li>Pentameter: There are five (“penta”) iambs in the line.</li>
  </ol>

  <p>Iambic pentameter is one of the most common metrical patterns in English poetry, often used in sonnets, blank verse, and other poetic forms.</p>

  <p>Would you like me to explain any aspect of this analysis further?</p>
</blockquote>

<p>But although we should be rightly impressed when a model does something amazing, we also need to push it to the point where it breaks. Back at my office, which is currently next to a construction site, I then tried a line with four anapests, a much less common meter. Claude still guesses iambic pentameter! The capitalization for stressed syllables is correct, but the scansion is the same as the previous example, and the syllable count is off by two.</p>

<blockquote>
  <p>Certainly, let’s analyze this new line:</p>

  <p>the con-STRUC-tion of BUILD-ings is WASHED by the RAIN</p>

  <p>Breaking it down, we have:</p>

  <p>unstressed - stressed - unstressed - stressed - unstressed - stressed - unstressed - stressed - unstressed - stressed</p>

  <p>This line has 10 syllables with a clear alternating pattern of unstressed and stressed syllables. This metrical pattern is known as iambic pentameter. Here’s why:</p>

  <ol>
    <li>Iambic: Each foot is an iamb (unstressed syllable followed by a stressed syllable).</li>
    <li>Pentameter: There are five (“penta”) iambs in the line.</li>
  </ol>

  <p>The line consists of five iambs:</p>
  <ol>
    <li>the con-</li>
    <li>STRUC-tion</li>
    <li>of BUILD-</li>
    <li>ings is</li>
    <li>WASHED by</li>
    <li>the RAIN</li>
  </ol>

  <p>This is a perfect example of iambic pentameter, one of the most common and influential meters in English poetry. It’s often used in sonnets, blank verse, and many other poetic forms.</p>
</blockquote>]]></content><author><name>David Mimno</name></author><category term="In-context learning" /><category term="Chatbots" /><summary type="html"><![CDATA[This afternoon I was at a presentation by the Cornell Digital Humanities Summer Fellows. Afterwards, I was talking analysis of poetic forms, and pulled out my laptop to try something out.]]></summary></entry><entry><title type="html">Google Colab Notebook Tips</title><link href="http://www.bertforhumanists.org//quick%20tips/colab-tips/" rel="alternate" type="text/html" title="Google Colab Notebook Tips" /><published>2021-06-03T00:00:00+00:00</published><updated>2021-06-03T00:00:00+00:00</updated><id>http://www.bertforhumanists.org//quick%20tips/colab-tips</id><content type="html" xml:base="http://www.bertforhumanists.org//quick%20tips/colab-tips/"><![CDATA[<p>Here are some tips for running BERT in a Google Colab notebook. If you run into strange error messages, if your model takes forever to train, or if your notebook keeps crashing, you should check make sure you’re following each of these tips!</p>

<ul>
  <li>When preparing your data, you must use a tokenizer that matches your pre-trained model (cased vs uncased, BERT vs DistilBERT, sequential vs model, etc.).</li>
  <li>Re-load / re-initialize models before re-fine-tuning with different parameters.</li>
  <li>To save space, delete your models when you’re done with them.</li>
  <li>To avoid running out of memory, use lower batch sizes and use DistilBERT.</li>
  <li>To take advantage of GPU, attach model to device and set the runtime to GPU.</li>
  <li>When using very small datasets, lower the number of warmup steps.</li>
  <li>Use a very small learning rate (~5x10-5).</li>
  <li>Factory reset the Colab runtime if CUDA is running out of memory.</li>
</ul>]]></content><author><name>Maria Antoniak</name></author><category term="Quick Tips" /><category term="Colab Notebooks" /><summary type="html"><![CDATA[Here are some tips for running BERT in a Google Colab notebook. If you run into strange error messages, if your model takes forever to train, or if your notebook keeps crashing, you should check make sure you’re following each of these tips!]]></summary></entry><entry><title type="html">What is BERT?</title><link href="http://www.bertforhumanists.org//introductions/Introduction/" rel="alternate" type="text/html" title="What is BERT?" /><published>2021-01-20T00:00:00+00:00</published><updated>2021-01-20T00:00:00+00:00</updated><id>http://www.bertforhumanists.org//introductions/Introduction</id><content type="html" xml:base="http://www.bertforhumanists.org//introductions/Introduction/"><![CDATA[<p><a href="https://ai.googleblog.com/2018/11/open-sourcing-bert-state-of-art-pre.html">BERT</a> is a state-of-the-art NLP method trained on a very large dataset of texts—namely, the entirety of English-language Wikipedia (2,500 million words) and a corpus of English-language books (800 million words). Thanks to this large amount of training data and its unique neural network architecture, BERT—–and subsequent methods like it (e.g., <a href="[https://openai.com/blog/better-language-models/">GPT-2</a>)–—can understand human language significantly better than previous NLP methods. For example, BERT can identify whether a sentence expresses positive or negative sentiment, predict what sentence should come next in a paragraph, and disambiguate between multivalent words with never-before-seen levels of accuracy.</p>]]></content><author><name>Melanie Walsh</name></author><category term="Introductions" /><category term="update" /><summary type="html"><![CDATA[BERT is a state-of-the-art NLP method trained on a very large dataset of texts—namely, the entirety of English-language Wikipedia (2,500 million words) and a corpus of English-language books (800 million words). Thanks to this large amount of training data and its unique neural network architecture, BERT—–and subsequent methods like it (e.g., GPT-2)–—can understand human language significantly better than previous NLP methods. For example, BERT can identify whether a sentence expresses positive or negative sentiment, predict what sentence should come next in a paragraph, and disambiguate between multivalent words with never-before-seen levels of accuracy.]]></summary></entry></feed>