aifree.dev

Vì sao nó cứ lặp đi lặp lại một câu?

Vòng lặp lặp lại: mô hình ngôn ngữ viết từng mẩu chữ có xác suất cao, và khi một cụm đã nằm trên trang, chép lại cụm đó càng dễ xảy ra mỗi lần nó xuất hiện (vòng tự củng cố), nhất là khi mô hình luôn chọn mẩu đứng đầu (greedy decoding, temperature 0); giữ chút ngẫu nhiên (temperature hoặc top-p), frequency penalty hay repetition penalty, mở cuộc trò chuyện mới và yêu cầu định dạng rõ ràng sẽ phá vòng lặp · Cơ bản · 5 phút · sampling, llm · học sau Dự đoán token tiếp theo, Temperature và lấy mẫu

Chatbot lặp lại vì mỗi cụm đã có trên trang làm chính cụm đó dễ được viết tiếp hơn. Luôn chọn từ đứng đầu biến điều này thành vòng lặp. Chút ngẫu nhiên, repetition penalty hay cuộc trò chuyện mới sẽ phá nó.

Trước khi bắt đầu: bạn giải thích được chuyện này cho bạn bè không?

1 = hoàn toàn không · 5 = dễ dàng

  1. 1 Đoán trước

    GPT-2 cứ viết mãi câu “I’m not sure if I’ll ever be able to walk with my dog.” (Tôi không chắc mình có bao giờ dắt chó đi dạo được không.) Lần đầu, từ “sure” có 20%. Lần thứ tư thì sao?
  2. 2 Xem

    How one sentence turns into a loop

    1 / 6

    GPT-2 small, top piece every time

    I enjoy walking with my cute dog, but I’m not sure if I’ll ever be able to walk with my dog. 1 I’m not sure if I’ll ever be able to walk with my dog. 2 I’m not sure if I’ll ever be able to walk with my dog. 3 I’m not sure if I’ll ever… 4

    Numbers mark each copy of the sentence. GPT-2 also put a blank line before copy 3.

    GPT-2 small, greedy, computed 2026-10-24

    GPT-2, always taking its most likely next piece, continues “I enjoy walking with my cute dog”. It writes one new sentence, then the same sentence again, and again.

    Mỗi bản sao của một câu trên trang làm bản sao kế tiếp dễ ra hơn. Mô hình luôn chọn từ đứng đầu sẽ đi theo những xác suất đó vào một vòng lặp không thoát ra được.

  3. Mô hình viết từng mẩu một, đọc lại mọi thứ đã có. Chữ đã nằm trên trang là gợi ý mạnh nhất của nó, nên cụm vừa viết trở thành cụm dễ viết tiếp. Viết lại lần nữa thì gợi ý càng mạnh. Các nhà nghiên cứu gọi đây là hiệu ứng tự củng cố: càng nhiều bản sao, càng dễ có thêm một bản.

  4. 4 Bạn là model

    Bạn là GPT-2, đang viết tiếp “I enjoy walking with my cute dog”. Ba lần, tại cùng một chỗ trong cùng một câu, hãy chọn từ tiếp theo. Rồi xem xác suất thật của GPT-2.

    Round 1 of 3. The sentence is new.

    I enjoy walking with my cute dog, but I’m not ___

    GPT-2 small, greedy, computed 2026-10-24: its real top four words at each spot

    You are GPT-2. Pick the next word.
  5. 5 Kiểm tra

    Trong hình, xác suất của “’m not sure if I’ll ever” thay đổi thế nào mỗi lần GPT-2 viết lại?
  6. Đây không phải một ví dụ lạ. Holtzman et al. (2019) cho GPT-2 Large viết 5.000 văn bản. Luôn chọn từ đứng đầu: 73,66% kết thúc trong vòng lặp. Với top-p (rút từ nhóm từ có xác suất cao nhất cộng lại đủ 95%): 0,36%; văn bản người viết: 0,28%. Xu et al. (2022) thấy cùng lực kéo đó: càng nhiều bản sao, bản kế tiếp càng dễ ra.

  7. Ứng dụng chat vốn đã gieo xúc xắc, nên chatbot lớn hiếm khi lặp nguyên văn từng chữ. Lực kéo vẫn còn: cùng một câu mở đầu, cùng các ý trong một cuộc trò chuyện dài. Hãy mở cuộc trò chuyện mới để bản sao cũ rời khỏi trang, và yêu cầu định dạng rõ ràng. Khi dùng API, giữ temperature gần mặc định và thêm frequency penalty: từ lặp lại bị giảm xác suất.

  8. 8 Nói lại bằng lời bạn

  9. 9 Nhiệm vụ · 5 phút

    Trong ChatGPT Free, xin 15 tên cho một quán cà phê. Rồi nói “15 more” (thêm 15 tên) ba lần trong cùng cuộc trò chuyện và đếm những tên, hoặc kiểu tên, quay lại. Sau đó mở cuộc trò chuyện mới và hỏi một lần: “60 coffee shop names, numbered, each starting with a different word, none repeating an earlier one.” (60 tên quán cà phê, đánh số, mỗi tên bắt đầu bằng một từ khác nhau, không tên nào lặp lại tên trước.) Danh sách nào lặp ít hơn?

Ba câu nhanh

Rút ngẫu nhiên từ bộ câu hỏi của bài; lần sau sẽ khác.

Xong chưa?

Còn bây giờ: bạn giải thích được cho bạn bè chưa?

1 = hoàn toàn không · 5 = dễ dàng

Trả lời ba câu nhanh trước đã.

Nhận email khi có bài mới

Bài mới nằm trong bản tin hằng tuần, chỉ gửi vào tuần có bài. Bạn xác nhận qua email trước; hủy đăng ký chỉ với một lần bấm.

Nguồn

  • GPT-2 small (124M, Hugging Face “gpt2”), greedy decoding (top piece every time) of 60 pieces after “I enjoy walking with my cute dog”, computed 2026-10-24 with scripts/explain-data/repetition.ts (plain forward pass of scripts/explain-data/distill.ts). Odds of “ sure” on copies 1–4: 0.2008, 0.6583, 0.9297, 0.9970; average of the seven pieces “’m not sure if I’ll ever”: 0.2354, 0.4937, 0.7251, 0.9905. After the first “dog.”: “ I” 0.2322, new line 0.1686, “ It” 0.0417, “ So” 0.0360. The role’s top four at “I’m not”: copy 1 sure 0.2008, a 0.1175, really 0.0533, going 0.0438; copy 2 sure 0.6583, a 0.0441, going 0.0234, really 0.0228; copy 4 sure 0.9970, certain 0.0017, clear 0.0001, even 0.0001. The same prompt and greedy loop appear in Hugging Face’s “How to generate text” (2020, model gpt2)
  • Same run with frequency penalty 0.5, applied as in OpenAI’s frequency_penalty (log-odds minus 0.5 × times already written, then renormalised): after the first “dog.”, “ I” 0.1001, new line 0.1976; the text continues “I’m a big fan of the “I love walking with my dog” meme. …” without repeating the sentence
  • Holtzman, Buys, Du, Forbes and Choi, “The Curious Case of Neural Text Degeneration” (ICLR 2020; arXiv:1904.09751 v2, 2020-02-14, https://arxiv.org/abs/1904.09751, checked 2026-10-24): GPT-2 Large (762M), 5,000 passages of up to 200 tokens. Table 1, Repetition %: Greedy 73.66, Beam b=16 28.94, Top-k=40 t=0.7 8.86, Sampling t=0.9 0.66, Nucleus p=0.95 0.36, Human 0.28. Figure 9: a phrase (minimum length 2) counts as a repetition “when it repeats at least three times at the end of the generation”. Figure 4: “The probability of a repeated phrase increases with each repetition, creating a positive feedback loop.”
  • Xu, Liu, Yan, Cai, Li and Li, “Learning to Break the Loop: Analyzing and Mitigating Repetitions for Neural Text Generation” (NeurIPS 2022; arXiv:2206.02369 v2, 2022-10-09, https://arxiv.org/abs/2206.02369, checked 2026-10-24): “there are few consecutive sentence-level repetitions in human corpora (e.g., 0.02% in Wikitext-103)”; “the more times a sentence is repeated in the context, the higher the probability of continuing to generate that sentence”. Table 1 (greedy, Wikitext-103), Repetition-Sen: MLE 14.50%, Human 0.01%
  • OpenAI API reference, frequency_penalty (openai/openai-openapi spec, checked 2026-10-24): “Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model’s likelihood to repeat the same line verbatim.”
  • Google, Gemini API docs, “Gemini 3 Developer Guide” (https://ai.google.dev/gemini-api/docs/gemini-3, last updated 2026-10-09, checked 2026-10-24): “we strongly recommend keeping the temperature parameter at its default value of 1.0”; “Changing the temperature (setting it below 1.0) may lead to unexpected behavior, such as looping or degraded performance”
  • The mission’s coffee-shop prompt and the habit wording are illustrative, written for this lesson on 2026-10-24
  • aifree.dev catalog, chatgpt-free (verified 2026-10-12, live check 2026-10-24): ChatGPT Free Plan

Đăng Oct 24, 2026 · cập nhật Oct 24, 2026

Never miss new offers and news

New tools, credits, and AI news are added regularly. Pick how you want to hear about them.

Telegram channel
Join @aifree_dev and get new free AI offers and news right in your Telegram feed.
Browser notifications
Turn on push notifications and get an alert on this device whenever something new is posted. No account needed.
Email newsletter
A weekly digest of new, changed and expiring free AI offers. Double opt-in, one-click unsubscribe. See the latest issue.

Unsubscribe anytime. Privacy

Frequently asked questions

What is aifree.dev?

aifree.dev helps everyone access AI through a curated directory of free AI tools, API credits, free tiers, and startup programs for coding, image, voice, video, and students - verified regularly.

How are offers presented?

Each offer includes its access details, free models when available, and expiration information when provided. Limited-time deals stay visible so they are easy to compare.

Do education and startup programs need verification?

Yes. Providers usually ask students to verify their status with a school email, student ID, or a program like the GitHub Student Pack, and ask startups to verify company details such as age, funding, or website. Check each offer’s claim page for the exact requirements.

What kinds of free AI offers are listed?

Free tiers and free trials from AI providers, free API credits, startup and student programs, and free tools for coding, image generation, voice, and video.

How can I suggest a tool or report a broken link?

Use the submit form: paste the offer page URL and a short note. A person checks every submission before anything is listed. Broken links and changed terms go through the same form.

+

Know a good one?

Tell us about an AI tool worth knowing. Found a broken link? We want to hear that too.

Submit an offer