Skip to content

[docs] Romanian translation of weightconverter.md, models.md, custom_models.md, monkey_patching.md, fusion_mapping.md, how_to_hack_models.md, model_sharing.md and serialization.md.#46309

Merged
stevhliu merged 8 commits into
huggingface:mainfrom
filipinescu:ro
Jun 1, 2026

Conversation

@filipinescu
Copy link
Copy Markdown
Contributor

What does this PR do?

Translates weightconverter.md, models.md, custom_models.md, monkey_patching.md, fusion_mapping.md, how_to_hack_models.md, model_sharing.md and serialization.md into Romanian. Also updates the _toctree.yml file accordingly.

Continuation of #46166, related to issue #38435.

Before submitting

  • This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
  • Did you read the contributor guideline,
    Pull Request section?

@stevhliu

Comment thread docs/source/ro/models.md
<!-- insert diagram of model and configuration -->

> [!TIP]
> O *arhitectură* se referă la scheletul modelului, iar un *checkpoint* se referă la weights pentru o anumită arhitectură. De exemplu, [BERT] este o arhitectură, în timp ce [google-bert/bert-base-uncased](https://huggingface.co/google-bert/bert-base-uncased) este un checkpoint. Vei vedea termenul *model* utilizat interschimbabil cu arhitectura și checkpoint-ul.
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed link, will update when referenced file is translated

Comment thread docs/source/ro/models.md

Pentru a obține un model pre-antrenat, trebuie să încarci weights în model. Acest lucru se face apelând [`~PreTrainedModel.from_pretrained`] care acceptă weights de pe Hub-ul Hugging Face sau dintr-un folder local.

Există două clase de model: clasa [AutoModel] și o clasă specifică modelului.
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed link, will update when referenced file is translated

Comment thread docs/source/ro/models.md

<Youtube id="AhChOFRegn4"/>

Clasa [AutoModel] este o modalitate convenabilă de a încărca o arhitectură fără a fi nevoie să cunoști numele exact al clasei de model, deoarece există multe modele disponibile. Selectează automat clasa de model corectă pe baza fișierului de configurație. Trebuie să știi doar task-ul și checkpoint-ul pe care vrei să le utilizezi.
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed link, will update when referenced file is translated

AutoModelForImageClassification.register(ResnetConfig, ResnetModelForImageClassification)
```

Codul modelului tău personalizat este acum compatibil cu API-ul [AutoClass](./models#autoclass). Utilizatorii pot încărca modelul cu clasele [AutoModel] sau [`AutoModelForImageClassification`].
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed link, will update when referenced file is translated

Monkey patching îți permite să înlocuiești componente ale modelului la nivel global fără a modifica codul original al modelului. Odată înregistrate, patch-urile sunt aplicate automat la încărcarea oricărui model cu [`~PreTrainedModel.from_pretrained`] sau [`~PreTrainedModel.from_config`]. Aceasta îți permite să restructurezi modele pentru cerințe specifice precum compatibilitatea cu quantization, să aplici optimizări sau să experimentezi cu variante arhitecturale.

> [!WARNING]
> **Monkey patching ar trebui folosit ca ultimă soluție** atunci când trebuie să schimbi layout-ul și structura unui modul și/sau weights asociate acestuia. Pentru nevoile de personalizare și optimizare, încearcă să folosești în schimb [interfața Attention], [interfața Experts] sau [registrul Kernels]. Folosește monkey patching doar când ai nevoie de schimbări structurale care nu pot fi realizate doar prin implementări forward personalizate (e.g., pentru compatibilitatea cu biblioteci de quantization, fuzionarea layers, sau experimente arhitecturale).
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed links, will update when referenced files are translated


## Clasa attention

[Segment Anything] este un model de segmentare a imaginilor care combină proiecția query-key-value (`qkv`) în mecanismele sale de attention. Pentru a reduce numărul de parametri antrenabili și overhead-ul computațional, poți aplica LoRA proiecției `qkv`. Aceasta necesită împărțirea proiecției `qkv` astfel că poți targeta separat `q` și `v` cu LoRA.
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed link, will update when referenced file is translated

Copy link
Copy Markdown
Contributor Author

@filipinescu filipinescu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added comments

@HuggingFaceDocBuilderDev
Copy link
Copy Markdown

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

Copy link
Copy Markdown
Member

@stevhliu stevhliu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks 🤗

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants