> This page is for NeMo-RL, version último (default).
> For other versions, use one of these documentation indexes:
> - último (default): https://es.nvidia-localization.ferndocs.com/es/nemo/rl/latest/llms.txt
> - 0.3.0: https://es.nvidia-localization.ferndocs.com/es/nemo/rl/0-3-0/llms.txt
> - 0.2.1: https://es.nvidia-localization.ferndocs.com/es/nemo/rl/0-2-1/llms.txt

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://es.nvidia-localization.ferndocs.com/es/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://es.nvidia-localization.ferndocs.com/es/_mcp/server.

# nemo_rl.models.megatron.community_import

## Contenido del Módulo

### Funciones

| Nombre                                                                                      | Descripción                                                                                                                                   |
| ------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
| [`import_model_from_hf_name`](#nemorlmodelsmegatroncommunityimportimportmodelfromhfname)    | Importar un modelo de Hugging Face al formato de punto de control de Megatron y guardar el punto de control de Megatron en la ruta de salida. |
| [`export_model_from_megatron`](#nemorlmodelsmegatroncommunityimportexportmodelfrommegatron) | Ninguno                                                                                                                                       |

### API

```python
nemo_rl.models.megatron.community_import.import_model_from_hf_name(
    hf_model_name: str,
    output_path: str,
    megatron_config: typing.Optional[nemo_rl.models.policy.MegatronConfig] = None
)
```

Importar un modelo de Hugging Face al formato de punto de control de Megatron y guardar el punto de control de Megatron en la ruta de salida.

Argumentos:
hf_model_name: ID de modelo de Hugging Face o ruta local (por ejemplo, 'meta-llama/Llama-3.1-8B-Instruct').
output_path: Directorio para escribir el punto de control de Megatron (por ejemplo, /tmp/megatron_ckpt).
megatron_config: Configuración de Megatron opcional con configuraciones de paralelismo para importación de modelo Megatron distribuido.

```python
nemo_rl.models.megatron.community_import.export_model_from_megatron(
    hf_model_name: str,
    input_path: str,
    output_path: str,
    hf_tokenizer_path: str,
    overwrite: bool = False
)
```