git404hub

what is laser fr?

facebookresearch/laser — explained in plain English

Analysis updated 2026-07-03

3,661Jupyter NotebookAudience · researcherComplexity · 3/5LicenseSetup · moderate

tl;dr

LASER turns sentences into numerical embeddings that work across 200+ languages, so text in English and its French translation land near each other in vector space, no translator needed.

vibe map

mindmap
  root((LASER))
    What it does
      Multilingual embeddings
      Cross-language matching
      Parallel sentence mining
    Models
      LASER-2 unified encoder
      LASER-3 language-specific
    Use Cases
      Translation training data
      Cross-language classification
      Speech mining
    Tech Stack
      Python
      PyTorch
      FAISS

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

what do people make with this?

VIBE 1

Mine parallel sentence pairs from Wikipedia across 200 languages to build translation training datasets.

VIBE 2

Encode multilingual product reviews into a shared vector space so you can find similar reviews across languages.

VIBE 3

Build a cross-language document classifier that groups news articles regardless of the language they are written in.

VIBE 4

Create speech-to-speech translation datasets by matching spoken segments across language pairs.

what's the stack?

PythonPyTorchFAISSJupyter Notebook

how it stacks up fr

facebookresearch/laserchiphuyen/python-is-cooldatadog/go-profiler-notes
Stars3,6613,6593,666
LanguageJupyter NotebookJupyter NotebookJupyter Notebook
Setup difficultymoderateeasyeasy
Complexity3/52/51/5
Audienceresearcherdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

how do i run it?

Difficulty · moderate time til it works · 30min

Basic use via laser_encoders is pip-installable, advanced mining tools need extra deps like FAISS and language-specific tokenizers.

MIT license, use freely for any purpose including commercial, keep the copyright notice.

in plain english

LASER is a research library from Meta AI that converts sentences into numerical representations called embeddings, with the distinguishing property that it works across more than 200 languages. The name stands for Language-Agnostic Sentence Representations. The practical consequence is that a sentence in English and its translation in French will produce embeddings that are numerically close to each other, even though the two sentences share no words. This property makes it useful for a set of tasks that require matching text across languages without a human translator involved. The library includes tools for mining parallel sentences from large text sources like Wikipedia and the web, meaning it can automatically find pairs of sentences across different languages that say the same thing. Those mined pairs can then be used to train translation systems. The simplest way to use it is through a pip-installable package called laser_encoders, which supports two families of models called LASER-2 and LASER-3. LASER-2 uses one encoder for all supported languages, while LASER-3 provides 147 language-specific encoders. A few lines of Python code are enough to load a model and turn a list of sentences into numerical vectors. The full kit includes more dependencies for advanced use cases, including tools for fast nearest-neighbor search and Chinese and Japanese text segmentation. The repository also contains several research tasks showing how the embeddings have been applied, such as cross-language document classification and speech-to-speech translation mining.

prompts (copy fr)

prompt 1
Using the LASER laser_encoders Python package, write code that loads the LASER-2 model and encodes a list of English and Spanish sentences into embeddings, then finds the closest Spanish sentence for each English one using cosine similarity.
prompt 2
How do I use LASER-3 to encode sentences in Japanese and return their vector representations? Show me the minimal Python code needed.
prompt 3
Write a Python script that uses LASER to mine parallel sentences from two large plain-text files (one English, one German) and saves the matched pairs to a CSV file.
prompt 4
I want to fine-tune a translation model. How do I use LASER's parallel sentence mining tools to generate training data from Common Crawl for a low-resource language pair?

Frequently asked questions

what is laser fr?

LASER turns sentences into numerical embeddings that work across 200+ languages, so text in English and its French translation land near each other in vector space, no translator needed.

What language is laser written in?

Mainly Jupyter Notebook. The stack also includes Python, PyTorch, FAISS.

What license does laser use?

MIT license, use freely for any purpose including commercial, keep the copyright notice.

How hard is laser to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is laser for?

Mainly researcher.

peek the repo → explain another one

This repo across BitVibe Labs

double-check against the repo, no cap.