POLARISAI ACADEMY

AI quiz

Fifteen multiple-choice questions take you from prompts and tokens to the EU AI Act and GPU memory, each with a reason and a page to check. Weekly scores and a leaderboard open later, when members can sign in.

AI quiz

  1. Which prompt gives the model the clearest job?

    AnswerWrite an 80-word note to a neighbor who will feed my dog for three days. Meals at 08:00 and 18:00, one cup of kibble, no chocolate. Plain sentences. — The third prompt names the reader, the length, the times, the amount, and a hard limit (no chocolate). The others leave those choices open, so the model has to invent them.
  2. In Google's generative-AI glossary, a hallucination is which of these?

    AnswerPlausible-seeming but factually incorrect output that asserts something about the real world. — The glossary defines hallucination as plausible-seeming but factually incorrect output that purports to assert something about the real world. Its example is a model claiming Barack Obama died in 1865.
  3. In a language model, a token is:

    AnswerThe atomic unit the model trains on and predicts, often a word, a character, or a subword. — Google's machine learning glossary defines a token as that atomic unit, and lists word, character, and subword tokens. A subword split is why the token count and the word count often differ. Bills and context windows use the token count.
  4. A short email has correct spelling and polite grammar. What does that establish about the writer?

    AnswerSpelling and politeness leave the writer unidentified. — People and models both produce tidy, polite sentences. Only the product screen, the model field in the API response, or a named person tells you who wrote it. The sentences on their own carry none of those labels.
  5. A reply gives a precise population for a city and names no source. A sound next step is:

    AnswerAsk which published page the figure came from, then open that page. — Fluency and a specific number can sit on top of a wrong fact. Google's hallucination entry is exactly that pattern. The check is the named statistical office, census, or other page, opened and read.
  6. A fluent answer is saved in a file with no product name and no API field. From the prose alone, which model wrote it?

    AnswerYou cannot tell. The label is the product screen or the API model field. — Style and a single date are weak evidence. Human writing and model writing share contractions, tidy grammar, and confident dates. The reliable name is the interface or the response metadata. Missing that, the paragraph is unsigned.
  7. A Chat Completions response includes prompt_tokens and completion_tokens. The usage the bill is built from is:

    AnswerInput tokens and output tokens. — OpenAI's chat completion object reports prompt_tokens and completion_tokens separately. A longer pasted source adds input tokens. A longer reply adds output tokens. The price per token is on the provider's current price page and can change.
  8. On a typical chat API, moving temperature from 0.8 toward 0.2 does which of these?

    AnswerMakes sampling less random, so repeats of the same prompt vary less. — The OpenAI API reference says higher temperature values make output more random and lower values make it more focused. Google's glossary describes temperature as the control on randomness. The setting does not fetch documents and does not update weights.
  9. You need the sum of one column in a CSV file you already have. The fitting tool is:

    AnswerA spreadsheet total, or a short program, on that file. — The inputs are local and the operation is arithmetic. An agent is a loop of plans and tool calls, which fits several lookups. Here that loop adds calls around a sum you can compute directly.
  10. Under Regulation (EU) 2024/1689, creating or expanding a facial-recognition database by untargeted scraping of face images from the internet or CCTV is:

    AnswerA prohibited AI practice under Article 5. — Article 5 prohibits that scraping practice: systems that create or expand facial-recognition databases through untargeted scraping of facial images from the internet or CCTV footage. The EUR-Lex summary of the Act still lists untargeted facial-recognition scraping among prohibited practices. Read the current consolidated text before relying on a paragraph letter or an application date, because the Act has been amended.
  11. A model has 32 layers, multi-head attention with hidden size 4096, and 16-bit keys and values (2 bytes). Cache bytes = 2 × layers × hidden size × tokens × bytes. At 8192 tokens the cache is:

    Answer4 GiB — 2 × 32 × 4096 × 8192 × 2 = 4,294,967,296 bytes = 4 GiB (4 × 1024^3). Per token that is 524,288 bytes, and 8192 × 524,288 = 4 GiB. The leading 2 counts keys and values. Weights are extra. Dropping the leading 2 yields 2 GiB, which is the usual miss.
  12. The original FlashAttention paper (Dao, Fu, Ermon, Rudra, and Ré, 2022) presents the algorithm as:

    AnswerAn exact attention algorithm that tiles the work and cuts memory traffic between GPU high-bandwidth memory and on-chip SRAM. — The paper's abstract describes an IO-aware exact attention algorithm using tiling to reduce reads and writes between high-bandwidth memory and on-chip SRAM. Block-sparse FlashAttention, in the same paper, is the approximate extension. This page paraphrases that result and does not reproduce the paper.
  13. Rotary position embedding (RoPE), as proposed for RoFormer, encodes position by:

    AnswerRotating pairs of dimensions so the query-key product depends on relative position. — Su and colleagues encode position with a rotation so that self-attention picks up relative distance. An added embedding vector, or a hand-set bias on the scores, is a different method. The RoFormer paper is under CC BY-NC-ND 4.0; this item paraphrases the mechanism.
  14. A mixture-of-experts layer is fully loaded on one GPU. Each token uses 2 of 8 feed-forward experts. Weight memory for that load follows:

    AnswerAll eight experts, because a later token can select a different pair, plus the router. — Compute for one token follows the experts that ran. A full on-GPU load still stores every expert, since the route can change on the next token. Offloading idle experts to CPU or disk is a different setup, with its own copy costs.
  15. Weights move from 16-bit floats to 4-bit integers. The KV cache stays 16-bit. What follows?

    AnswerWeight memory falls to about a quarter. The parameter count stays the same. Check a task score or perplexity. The 16-bit cache is unchanged. — Four bits is a quarter of sixteen bits, so the stored weights take about a quarter of the memory. You still have the same number of parameters. Quality can move, which is why a task score or perplexity comes after the conversion. A 16-bit cache still grows with context on the cache formula.

Beginner

Prompts, tokens, and made-up facts

A round is a short list of multiple-choice questions with one best answer, and a short explanation you can check.

The fifteen questions below are ready to use now. A weekly round, a saved score, and a leaderboard open later, when members can sign in.

A prompt is the message you give the model. A clear prompt names the task, the reader, the length, and the facts that must appear. "Write an 80-word note for the neighbor feeding my dog. Meals at 08:00 and 18:00, one cup of kibble, no chocolate" states those choices. "Write something nice about dogs" leaves the reader, the length, and the facts unspecified.

A token is the unit the model counts. Google's machine learning glossary calls a token the atomic unit a language model trains on and predicts: a word, a character, or a subword. Context limits and API bills use tokens, so a long pasted article spends more of the allowance than a short question.

A hallucination, in the generative-AI glossary, is plausible-seeming but factually incorrect output that asserts something about the real world. Their example is a model claiming Barack Obama died in 1865. Smooth grammar only shows that the sentences are well formed, not that they are true. The writer can be a person or a model, and a date in the text can still be wrong. For a number, a date, or a quotation, ask for the page it came from and open that page.

The free Swedish course Elements of AI covers this ground. The site credits MinnaLearn and the University of Helsinki, with Linköping University among the Swedish partners.

Quiz me on the first terms

Quiz me with 5 multiple-choice questions for someone new to AI. Use 4 options and one best answer each. Cover: what a prompt is, which of two prompts is more specific, what a token is (Google's glossary: a word, a character, or a subword), what a hallucination is (plausible-seeming but factually wrong output about the real world), and why tidy grammar leaves the writer unknown. After I answer all five, mark them. For each item, explain in plain English and name a page I can open. Skip invented statistics and invented quotes.

Intermediate

Bills, labels, agents, and the AI Act

Middle rounds ask you to judge a bill, a label, a tool, and a rule.

Contractions, tidy grammar, and a confident date appear in human writing and in model writing. The model name sits on the product screen or in the API field. With that label missing, the paragraph is unsigned.

Hosted chat APIs meter tokens. OpenAI's Chat Completions object reports prompt_tokens for the input and completion_tokens for the output. A long pasted document raises the input count. A long answer raises the output count.

Temperature controls sampling. In the OpenAI API reference, a higher value such as 0.8 makes the output more random, and a lower value such as 0.2 makes it more focused. Google's glossary states the same relationship between temperature and randomness. A low setting keeps a requested format steadier from one run to the next. The setting leaves sources and training weights alone.

An agent is a loop that plans steps and calls tools. That fits a job of several lookups: find the official article, note the paragraph, save the link. The sum of a column in a CSV you already have is a closed calculation. A spreadsheet or a short program does that sum on the file.

Regulation (EU) 2024/1689, the AI Act, sorts duties by risk. Article 5 prohibits some practices, including AI systems that create or expand facial-recognition databases by untargeted scraping of facial images from the internet or CCTV footage. High-risk uses carry heavier duties in the same regulation. The Act has been amended, so read the current consolidated text on EUR-Lex.

Bill, label, agent, AI Act

Quiz me with 5 multiple-choice questions, 4 options each. Topics: why prose alone leaves the model unnamed, how a chat API reports input tokens and output tokens, what temperature changes in sampling, when a spreadsheet fits better than an agent, and one practice prohibited by Article 5 of Regulation (EU) 2024/1689. After I answer, explain each item. For the legal item, paraphrase the article in one or two sentences and tell me to read the current consolidated text on EUR-Lex, because the Act has been amended. For billing and temperature, point at the OpenAI Chat Completions reference.

Expert

Cache math, attention, and small weights

Expert rounds use a formula you can recompute, or a mechanism from a paper.

A key-value cache (KV cache) stores keys and values already computed for earlier tokens, so the next token can reuse them. Hugging Face's cache guide describes that reuse. For multi-head attention, cache bytes equal 2 × layers × hidden size × tokens × bytes per number. The leading 2 is keys and values.

For 32 layers, hidden size 4096, 16-bit numbers (2 bytes), and 8192 tokens: 2 × 32 × 4096 × 8192 × 2 = 4,294,967,296 bytes = 4 GiB. Weights are a separate store from this cache.

FlashAttention (Dao, Fu, Ermon, Rudra, and Ré, 2022) matches the standard attention result. The paper's gain is data movement: tiling cuts traffic between GPU high-bandwidth memory and on-chip SRAM, and the full score matrix stays unwritten. The block-sparse extension in that paper is the approximate form.

RoPE, from the RoFormer paper, rotates pairs of dimensions in the query and the key. The query-key product then depends on the distance between positions.

A mixture-of-experts block holds several feed-forward experts and sends each token through a few of them. Compute for that token follows the experts that ran. With the whole model on one GPU, weight memory still includes the idle experts, because another token can take another route.

Weights stored in 4-bit integers instead of 16-bit floats take about a quarter of the weight memory. Measure a task score or perplexity after the change. A 16-bit KV cache still grows with context on the formula above.

Mark my KV-cache sum

Give me one problem and wait for my answer. Setup: 32 layers, multi-head attention, hidden size 4096, keys and values in 16-bit floats (2 bytes), context 8192 tokens. Ask for the KV-cache size in bytes and in GiB. Formula: 2 × layers × hidden size × tokens × bytes. The correct product is 4294967296 bytes, equal to 4 GiB. If I miss the leading 2, point at keys and values and show that one correction. Then ask what happens to weight memory if weights move from 16-bit to 4-bit while the cache stays 16-bit. If I mix this up with FlashAttention, point me to arXiv:2205.14135 and say that paper is about data movement for exact attention, while this problem is only the cache size.

How a round is scored

Until sign-in exists, mark the bank yourself. A weekly set, a stored score, and a leaderboard open with member accounts.

  • Answer every item in a level, then open the key.
  • One best option per question.
  • Keep three scores, each as correct answers over the questions in that level: beginner, intermediate, expert.
  • On a memory question, write the product. A total without the formula counts as unfinished.
  • On a legal question, open the consolidated AI Act and read the article named in the key. A later amendment overrides this page.
  • Read the explanation when your choice was right. The reason, and the page that holds it, is the point of the round.
Piece Now When sign-in opens
Question bank and written key The 15 items on this page Those items, plus a new set on a weekly rhythm
Your score You mark it Stored on the account
Leaderboard No board yet Opens with member sign-in

Cache formula card

Cache bytes for multi-head attention, 16-bit keys and values:

2 × layers × hidden size × tokens × 2

The first 2 is keys and values. The last 2 is bytes in a 16-bit number. Hidden size here means key-value heads times head size, which equals the model width in ordinary multi-head attention.

Worked example on this page: 32 layers, width 4096, 8192 tokens → 4,294,967,296 bytes → 4 GiB of cache, with weights counted separately. Moving weights from 16-bit to 4-bit scales the weight store by about 1/4 and leaves this cache line unchanged.

A shared community DGX Station would let a later expert round time one long context, a 4-bit weight load, and a mixture-of-experts model on the same machine, so the cache and weight totals in the key can be checked against a real run. About the shared station

Sources

  • Machine Learning GlossaryGoogle's definition of a token: the atomic unit a language model trains on and predicts, as a word, a character, or a subword.
  • Machine Learning Glossary: Generative AIDefinitions of hallucination (plausible but factually wrong output about the real world) and temperature (the control on how random the output is).
  • OpenAI Chat Completions API referenceTemperature (higher is more random, lower is more focused) and the usage fields prompt_tokens and completion_tokens. Check the current price page for the rate.
  • Regulation (EU) 2024/1689, the Artificial Intelligence ActOfficial text. Article 5 prohibits untargeted scraping of facial images to build or expand facial-recognition databases. The act page links the current consolidated version. European Union law; quote the journal, do not paste long extracts here.
  • Rules for trustworthy AI in the EU (EUR-Lex summary)Plain-language summary of the risk-based Act, including prohibited practices such as untargeted facial-recognition database scraping. Follow it with the consolidated regulation when you need the rule itself.
  • FlashAttention (Dao et al., 2022)The paper on IO-aware exact attention: tiling cuts GPU memory traffic, and the full score matrix need not be stored. Block-sparse attention is the approximate extension. Paraphrase only.
  • RoFormer: Rotary Position Embedding (Su et al.)RoPE encodes position by rotation so attention depends on relative distance. The arXiv record shows license CC BY-NC-ND 4.0. This page paraphrases the idea and does not reproduce the paper.
  • Hugging Face cache explanationHow a KV cache stores past keys and values so generation reuses them, with memory growing in step with length. For the beginner course, see the Swedish Elements of AI site: https://www.elementsofai.se (MinnaLearn, University of Helsinki, Swedish partners including Linköping University). Course text stays on their site.

Back to top