---
name: embedding_save_model
kind: function
lang: py
domain: infra
version: "1.0.0"
purity: impure
signature: "def embedding_save_model(model_id: str, path: str) -> str"
description: "Descarga modelo de embeddings de HuggingFace y lo guarda en path local para carga rapida sin red."
tags: [embedding, model, save, huggingface, e5, python, pendiente-usar]
uses_functions: []
uses_types: []
returns: []
returns_optional: false
error_type: "error_go_core"
imports: [sentence_transformers]
params:
  - name: model_id
    desc: "identificador de modelo en HuggingFace (ej: intfloat/multilingual-e5-small)"
  - name: path
    desc: "ruta local donde guardar el modelo descargado"
output: "string: ruta absoluta donde se guardó el modelo"
tested: false
tests: []
test_file_path: ""
file_path: "python/functions/embedding/model.py"
---

## Ejemplo

```python
path = embedding_save_model("intfloat/multilingual-e5-small", ".local/models/e5-small")
# path = "$HOME/fn_registry/.local/models/e5-small"
```

## Notas

El modelo se guarda en formato sentence-transformers (safetensors + tokenizer).
Para multilingual-e5-small ocupa ~465 MB en disco.
Carga local es ~2.3x mas rapida que desde HF cache.
