diff --git a/1-ttc.qmd b/1-ttc.qmd index fcfaf99..1d13ac9 100644 --- a/1-ttc.qmd +++ b/1-ttc.qmd @@ -23,7 +23,7 @@ Two main approaches exist for this task: | Approach | How it works | Best when | |---|---|---| | **Supervised (this notebook)** | Train a neural network on labelled examples | Large labelled dataset available, low-latency inference needed | -| **RAG** (see notebook 2) | Retrieve similar examples, ask a LLM to decide | Few labelled examples, need for explainability via retrieved context | +| **RAG** (see notebook 2) | Retrieve similar examples, ask a LLM to decide | Few labelled examples | In this notebook, we use the supervised approach: the model learns directly from thousands of labelled examples and can predict at inference time without calling an external API. @@ -42,7 +42,7 @@ flowchart LR ## What you will learn - How to prepare and split a labelled text dataset -- How to train a subword tokenizer (WordPiece) on domain-specific text +- How to train a subword tokenizer (WordPiece) on domain-specific text (tokenizers are introduced in @sec-tokenizer) - How to configure and train a neural text classifier end-to-end - How to load a pretrained model from MLflow and run inference - How to interpret predictions using the [Captum](https://captum.ai/docs/introduction) package @@ -100,7 +100,7 @@ The notebook loads this file automatically at startup with `load_dotenv()`, maki # Load the data -The dataset consists of **synthetic labelled examples** generated for the NACE 2025 nomenclature. +The dataset consists of **synthetic labelled examples** generated for the NACE rev 2.1 nomenclature. Each row contains a short text description (`label`) and the corresponding NACE code (`code`). ::: {.callout-tip collapse="false" icon=false} @@ -122,7 +122,7 @@ load_dotenv(override=True) ## Question 2 — Load the dataset from s3 -Use Polars to load the parquet file directly from this public URL: +Use [Polars](https://docs.pola.rs/api/python/stable/reference/index.html) to load the parquet file directly from this public URL: ``` https://minio.lab.sspcloud.fr/projet-formation/diffusion/funathon/2026/project2/generation_None_temp08.parquet @@ -286,7 +286,7 @@ value_encoder = ValueEncoder(label_encoder=encoder) ::: -# Applying a tokenizer +# Applying a tokenizer {#sec-tokenizer} ## Why tokenization? diff --git a/index.qmd b/index.qmd index edd3f81..8188643 100644 --- a/index.qmd +++ b/index.qmd @@ -81,7 +81,7 @@ Build a **retrieval-augmented generation** (RAG) system that combines a vector d Before diving into either part, follow these steps to set up your environment. The same setup applies to both parts. -If you need more details for setups, do not hesitate to visite [project 1 introduction page](https://aiml4os.github.io/funathon-project1/). +If you need more details for setups, do not hesitate to visite [project 1 introduction page](https://aiml4os.github.io/funathon-project1/) and/or watch the 2026's Funathon [Onboarding replay](https://aiml4os.github.io/funathon-general-website/onboarding.html). ## Fork this repository @@ -154,8 +154,4 @@ df["code"].value_counts().head(10).plot(kind="bar") A small "Run Cell" lens appears above each `# %%` marker. Click it to execute that block. You can also use the shortcut Shift + Enter. This is convenient for iterating on small pieces of code or testing specific functions from the project. -::: {.callout-tip} -Files created at the root of the repository for your own exploration (such as `scratch.py` or `notes.md`) can be safely ignored from git by adding them to your local `.gitignore`, or to `.git/info/exclude` if you don't want to commit the ignore rule. -::: - You're now ready to start. Head to [Part 1](1-ttc.qmd) or [Part 2](2-rag-intro.qmd).