text
stringlengths
5
424k
id
stringlengths
13
178
metadata
dict
__index_level_0__
int64
0
672
# Copyright 2025 The HuggingFace Team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
diffusers/src/diffusers/models/transformers/dual_transformer_2d.py/0
{ "file_path": "diffusers/src/diffusers/models/transformers/dual_transformer_2d.py", "repo_id": "diffusers", "token_count": 3174 }
169
# Copyright 2025 The EasyAnimate team and The HuggingFace Team. # All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # U...
diffusers/src/diffusers/models/transformers/transformer_easyanimate.py/0
{ "file_path": "diffusers/src/diffusers/models/transformers/transformer_easyanimate.py", "repo_id": "diffusers", "token_count": 10296 }
170
# Copyright 2025 The HuggingFace Team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
diffusers/src/diffusers/models/unets/unet_1d.py/0
{ "file_path": "diffusers/src/diffusers/models/unets/unet_1d.py", "repo_id": "diffusers", "token_count": 5137 }
171
# Copyright 2025 The HuggingFace Team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
diffusers/src/diffusers/models/vae_flax.py/0
{ "file_path": "diffusers/src/diffusers/models/vae_flax.py", "repo_id": "diffusers", "token_count": 15348 }
172
# Copyright 2025 Qwen-Image Team and The HuggingFace Team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless r...
diffusers/src/diffusers/modular_pipelines/qwenimage/decoders.py/0
{ "file_path": "diffusers/src/diffusers/modular_pipelines/qwenimage/decoders.py", "repo_id": "diffusers", "token_count": 3031 }
173
# Copyright 2025 The HuggingFace Team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
diffusers/src/diffusers/modular_pipelines/wan/denoise.py/0
{ "file_path": "diffusers/src/diffusers/modular_pipelines/wan/denoise.py", "repo_id": "diffusers", "token_count": 4317 }
174
# Copyright 2025 The HuggingFace Team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
diffusers/src/diffusers/pipelines/blip_diffusion/modeling_blip2.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/blip_diffusion/modeling_blip2.py", "repo_id": "diffusers", "token_count": 12021 }
175
from typing import TYPE_CHECKING from ...utils import ( DIFFUSERS_SLOW_IMPORT, OptionalDependencyNotAvailable, _LazyModule, get_objects_from_module, is_torch_available, is_transformers_available, ) _dummy_objects = {} _additional_imports = {} _import_structure = {"pipeline_output": ["CogView3...
diffusers/src/diffusers/pipelines/cogview3/__init__.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/cogview3/__init__.py", "repo_id": "diffusers", "token_count": 594 }
176
# Copyright 2025 Salesforce.com, inc. # Copyright 2025 The HuggingFace Team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENS...
diffusers/src/diffusers/pipelines/controlnet/pipeline_controlnet_blip_diffusion.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/controlnet/pipeline_controlnet_blip_diffusion.py", "repo_id": "diffusers", "token_count": 7765 }
177
# Copyright 2025 The HuggingFace Team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
diffusers/src/diffusers/pipelines/controlnet_xs/pipeline_controlnet_xs.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/controlnet_xs/pipeline_controlnet_xs.py", "repo_id": "diffusers", "token_count": 20043 }
178
import html import inspect import re import urllib.parse as ul from typing import Any, Callable, Dict, List, Optional, Union import numpy as np import PIL.Image import torch from transformers import CLIPImageProcessor, T5EncoderModel, T5Tokenizer from ...loaders import StableDiffusionLoraLoaderMixin from ...models im...
diffusers/src/diffusers/pipelines/deepfloyd_if/pipeline_if_img2img.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/deepfloyd_if/pipeline_if_img2img.py", "repo_id": "diffusers", "token_count": 18539 }
179
from typing import TYPE_CHECKING from ....utils import DIFFUSERS_SLOW_IMPORT, _LazyModule _import_structure = { "mel": ["Mel"], "pipeline_audio_diffusion": ["AudioDiffusionPipeline"], } if TYPE_CHECKING or DIFFUSERS_SLOW_IMPORT: from .mel import Mel from .pipeline_audio_diffusion import AudioDiffusi...
diffusers/src/diffusers/pipelines/deprecated/audio_diffusion/__init__.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/deprecated/audio_diffusion/__init__.py", "repo_id": "diffusers", "token_count": 212 }
180
from typing import TYPE_CHECKING from ....utils import ( DIFFUSERS_SLOW_IMPORT, OptionalDependencyNotAvailable, _LazyModule, get_objects_from_module, is_torch_available, is_transformers_available, ) _dummy_objects = {} _import_structure = {} try: if not (is_transformers_available() and i...
diffusers/src/diffusers/pipelines/deprecated/stable_diffusion_variants/__init__.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/deprecated/stable_diffusion_variants/__init__.py", "repo_id": "diffusers", "token_count": 817 }
181
# Copyright 2025 Microsoft and The HuggingFace Team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless require...
diffusers/src/diffusers/pipelines/deprecated/vq_diffusion/pipeline_vq_diffusion.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/deprecated/vq_diffusion/pipeline_vq_diffusion.py", "repo_id": "diffusers", "token_count": 6456 }
182
import inspect from typing import Any, Callable, Dict, List, Optional, Tuple, Union import numpy as np import PIL import torch from transformers import ( CLIPTextModel, CLIPTokenizer, T5EncoderModel, T5TokenizerFast, ) from ...image_processor import PipelineImageInput, VaeImageProcessor from ...loader...
diffusers/src/diffusers/pipelines/flux/pipeline_flux_controlnet_inpainting.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/flux/pipeline_flux_controlnet_inpainting.py", "repo_id": "diffusers", "token_count": 25353 }
183
# Copyright 2025 The HuggingFace Team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
diffusers/src/diffusers/pipelines/kandinsky2_2/pipeline_kandinsky2_2_combined.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/kandinsky2_2/pipeline_kandinsky2_2_combined.py", "repo_id": "diffusers", "token_count": 18863 }
184
# Copyright 2025 ChatGLM3-6B Model Team, Kwai-Kolors Team and The HuggingFace Team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses...
diffusers/src/diffusers/pipelines/kolors/tokenizer.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/kolors/tokenizer.py", "repo_id": "diffusers", "token_count": 5907 }
185
# Copyright 2025 Lightricks and The HuggingFace Team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requir...
diffusers/src/diffusers/pipelines/ltx/pipeline_ltx_condition.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/ltx/pipeline_ltx_condition.py", "repo_id": "diffusers", "token_count": 27913 }
186
# Copyright 2025 Stability AI, Kwai-Kolors Team and The HuggingFace Team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2...
diffusers/src/diffusers/pipelines/pag/pipeline_pag_kolors.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/pag/pipeline_pag_kolors.py", "repo_id": "diffusers", "token_count": 26791 }
187
# Copyright 2025 The HuggingFace Team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
diffusers/src/diffusers/pipelines/pia/pipeline_pia.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/pia/pipeline_pia.py", "repo_id": "diffusers", "token_count": 20782 }
188
import inspect from typing import Any, Callable, Dict, List, Optional, Union import numpy as np import PIL.Image import torch from transformers import Qwen2_5_VLForConditionalGeneration, Qwen2Tokenizer from ...image_processor import PipelineImageInput, VaeImageProcessor from ...loaders import QwenImageLoraLoaderMixin...
diffusers/src/diffusers/pipelines/qwenimage/pipeline_qwenimage_inpaint.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/qwenimage/pipeline_qwenimage_inpaint.py", "repo_id": "diffusers", "token_count": 23205 }
189
# coding=utf-8 # Copyright 2025 The HuggingFace Inc. team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
diffusers/src/diffusers/pipelines/stable_diffusion/convert_from_ckpt.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/stable_diffusion/convert_from_ckpt.py", "repo_id": "diffusers", "token_count": 36488 }
190
# Copyright 2025 The HuggingFace Team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
diffusers/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_upscale.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_upscale.py", "repo_id": "diffusers", "token_count": 17663 }
191
# Copyright 2025 The GLIGEN Authors and HuggingFace Team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless re...
diffusers/src/diffusers/pipelines/stable_diffusion_gligen/pipeline_stable_diffusion_gligen.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/stable_diffusion_gligen/pipeline_stable_diffusion_gligen.py", "repo_id": "diffusers", "token_count": 19280 }
192
# Copyright 2025 The HuggingFace Team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
diffusers/src/diffusers/pipelines/stable_diffusion_xl/pipeline_flax_stable_diffusion_xl.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/stable_diffusion_xl/pipeline_flax_stable_diffusion_xl.py", "repo_id": "diffusers", "token_count": 5263 }
193
import copy import inspect from dataclasses import dataclass from typing import Callable, List, Optional, Union import numpy as np import PIL.Image import torch import torch.nn.functional as F from torch.nn.functional import grid_sample from transformers import CLIPImageProcessor, CLIPTextModel, CLIPTokenizer from .....
diffusers/src/diffusers/pipelines/text_to_video_synthesis/pipeline_text_to_video_zero.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/text_to_video_synthesis/pipeline_text_to_video_zero.py", "repo_id": "diffusers", "token_count": 20339 }
194
# Copyright 2025 The HuggingFace Inc. team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appl...
diffusers/src/diffusers/quantizers/base.py/0
{ "file_path": "diffusers/src/diffusers/quantizers/base.py", "repo_id": "diffusers", "token_count": 3858 }
195
# Schedulers For more information on the schedulers, please refer to the [docs](https://huggingface.co/docs/diffusers/api/schedulers/overview).
diffusers/src/diffusers/schedulers/README.md/0
{ "file_path": "diffusers/src/diffusers/schedulers/README.md", "repo_id": "diffusers", "token_count": 46 }
196
# Copyright 2025 ParaDiGMS authors and The HuggingFace Team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless...
diffusers/src/diffusers/schedulers/scheduling_ddpm_parallel.py/0
{ "file_path": "diffusers/src/diffusers/schedulers/scheduling_ddpm_parallel.py", "repo_id": "diffusers", "token_count": 13203 }
197
# Copyright 2025 Stability AI, Katherine Crowson and The HuggingFace Team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-...
diffusers/src/diffusers/schedulers/scheduling_flow_match_lcm.py/0
{ "file_path": "diffusers/src/diffusers/schedulers/scheduling_flow_match_lcm.py", "repo_id": "diffusers", "token_count": 10387 }
198
# Copyright 2025 Stanford University Team and The HuggingFace Team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # #...
diffusers/src/diffusers/schedulers/scheduling_tcd.py/0
{ "file_path": "diffusers/src/diffusers/schedulers/scheduling_tcd.py", "repo_id": "diffusers", "token_count": 14671 }
199
# This file is autogenerated by the command `make fix-copies`, do not edit. from ..utils import DummyObject, requires_backends class MidiProcessor(metaclass=DummyObject): _backends = ["note_seq"] def __init__(self, *args, **kwargs): requires_backends(self, ["note_seq"]) @classmethod def from...
diffusers/src/diffusers/utils/dummy_note_seq_objects.py/0
{ "file_path": "diffusers/src/diffusers/utils/dummy_note_seq_objects.py", "repo_id": "diffusers", "token_count": 201 }
200
import io import random import struct import tempfile from contextlib import contextmanager from typing import List, Optional, Union import numpy as np import PIL.Image import PIL.ImageOps from .import_utils import BACKENDS_MAPPING, is_imageio_available, is_opencv_available from .logging import get_logger global_rn...
diffusers/src/diffusers/utils/export_utils.py/0
{ "file_path": "diffusers/src/diffusers/utils/export_utils.py", "repo_id": "diffusers", "token_count": 3217 }
201
# Copyright 2020 The HuggingFace Team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
diffusers/src/diffusers/utils/versions.py/0
{ "file_path": "diffusers/src/diffusers/utils/versions.py", "repo_id": "diffusers", "token_count": 1699 }
202
# Copyright 2025 HuggingFace Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
diffusers/tests/lora/test_lora_layers_ltx_video.py/0
{ "file_path": "diffusers/tests/lora/test_lora_layers_ltx_video.py", "repo_id": "diffusers", "token_count": 2157 }
203
# coding=utf-8 # Copyright 2025 HuggingFace Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
diffusers/tests/models/autoencoders/test_models_autoencoder_hunyuan_video.py/0
{ "file_path": "diffusers/tests/models/autoencoders/test_models_autoencoder_hunyuan_video.py", "repo_id": "diffusers", "token_count": 3389 }
204
# coding=utf-8 # Copyright 2025 HuggingFace Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
diffusers/tests/models/test_modeling_common.py/0
{ "file_path": "diffusers/tests/models/test_modeling_common.py", "repo_id": "diffusers", "token_count": 49158 }
205
# coding=utf-8 # Copyright 2025 HuggingFace Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
diffusers/tests/models/transformers/test_models_transformer_flux.py/0
{ "file_path": "diffusers/tests/models/transformers/test_models_transformer_flux.py", "repo_id": "diffusers", "token_count": 3868 }
206
# Copyright 2025 HuggingFace Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
diffusers/tests/models/transformers/test_models_transformer_wan.py/0
{ "file_path": "diffusers/tests/models/transformers/test_models_transformer_wan.py", "repo_id": "diffusers", "token_count": 1199 }
207
# Copyright 2025 The HuggingFace Team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
diffusers/tests/others/test_check_copies.py/0
{ "file_path": "diffusers/tests/others/test_check_copies.py", "repo_id": "diffusers", "token_count": 2028 }
208
# Copyright 2025 The HuggingFace Team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
diffusers/tests/pipelines/cogvideo/test_cogvideox.py/0
{ "file_path": "diffusers/tests/pipelines/cogvideo/test_cogvideox.py", "repo_id": "diffusers", "token_count": 6340 }
209
# coding=utf-8 # Copyright 2025 Harutatsu Akiyama, Jinbin Bai, and HuggingFace Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unle...
diffusers/tests/pipelines/controlnet/test_controlnet_inpaint_sdxl.py/0
{ "file_path": "diffusers/tests/pipelines/controlnet/test_controlnet_inpaint_sdxl.py", "repo_id": "diffusers", "token_count": 5980 }
210
# Copyright 2025 The HuggingFace Team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
diffusers/tests/pipelines/cosmos/test_cosmos2_video2world.py/0
{ "file_path": "diffusers/tests/pipelines/cosmos/test_cosmos2_video2world.py", "repo_id": "diffusers", "token_count": 6246 }
211
# Copyright 2025 The HuggingFace Team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
diffusers/tests/pipelines/easyanimate/test_easyanimate.py/0
{ "file_path": "diffusers/tests/pipelines/easyanimate/test_easyanimate.py", "repo_id": "diffusers", "token_count": 4877 }
212
# Copyright 2025 The HuggingFace Team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
diffusers/tests/pipelines/hunyuan_video/test_hunyuan_skyreels_image2video.py/0
{ "file_path": "diffusers/tests/pipelines/hunyuan_video/test_hunyuan_skyreels_image2video.py", "repo_id": "diffusers", "token_count": 5967 }
213
# coding=utf-8 # Copyright 2025 HuggingFace Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
diffusers/tests/pipelines/kandinsky2_2/test_kandinsky_controlnet.py/0
{ "file_path": "diffusers/tests/pipelines/kandinsky2_2/test_kandinsky_controlnet.py", "repo_id": "diffusers", "token_count": 4383 }
214
# coding=utf-8 # Copyright 2025 HuggingFace Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
diffusers/tests/pipelines/latent_diffusion/test_latent_diffusion.py/0
{ "file_path": "diffusers/tests/pipelines/latent_diffusion/test_latent_diffusion.py", "repo_id": "diffusers", "token_count": 3467 }
215
# coding=utf-8 # Copyright 2025 HuggingFace Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
diffusers/tests/pipelines/pag/test_pag_pixart_sigma.py/0
{ "file_path": "diffusers/tests/pipelines/pag/test_pag_pixart_sigma.py", "repo_id": "diffusers", "token_count": 5935 }
216
# coding=utf-8 # Copyright 2025 HuggingFace Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
diffusers/tests/pipelines/pndm/test_pndm.py/0
{ "file_path": "diffusers/tests/pipelines/pndm/test_pndm.py", "repo_id": "diffusers", "token_count": 1311 }
217
# coding=utf-8 # Copyright 2022 HuggingFace Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
diffusers/tests/pipelines/stable_diffusion/test_onnx_stable_diffusion_upscale.py/0
{ "file_path": "diffusers/tests/pipelines/stable_diffusion/test_onnx_stable_diffusion_upscale.py", "repo_id": "diffusers", "token_count": 3967 }
218
# coding=utf-8 # Copyright 2025 HuggingFace Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
diffusers/tests/pipelines/test_pipelines.py/0
{ "file_path": "diffusers/tests/pipelines/test_pipelines.py", "repo_id": "diffusers", "token_count": 50632 }
219
The tests here are adapted from [`transformers` tests](https://github.com/huggingface/transformers/tree/409fcfdfccde77a14b7cc36972b774cabc371ae1/tests/quantization/bnb). They were conducted on the `audace` machine, using a single RTX 4090. Below is `nvidia-smi`: ```bash +----------------------------------------------...
diffusers/tests/quantization/bnb/README.md/0
{ "file_path": "diffusers/tests/quantization/bnb/README.md", "repo_id": "diffusers", "token_count": 1033 }
220
import inspect import tempfile import unittest from typing import Dict, List, Tuple import torch from diffusers import EDMEulerScheduler from .test_schedulers import SchedulerCommonTest class EDMEulerSchedulerTest(SchedulerCommonTest): scheduler_classes = (EDMEulerScheduler,) forward_default_kwargs = (("nu...
diffusers/tests/schedulers/test_scheduler_edm_euler.py/0
{ "file_path": "diffusers/tests/schedulers/test_scheduler_edm_euler.py", "repo_id": "diffusers", "token_count": 3799 }
221
# coding=utf-8 # Copyright 2025 HuggingFace Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
diffusers/tests/schedulers/test_schedulers.py/0
{ "file_path": "diffusers/tests/schedulers/test_schedulers.py", "repo_id": "diffusers", "token_count": 17205 }
222
import gc import unittest import torch from diffusers import ( StableDiffusionImg2ImgPipeline, ) from diffusers.utils import load_image from ..testing_utils import ( backend_empty_cache, enable_full_determinism, require_torch_accelerator, slow, torch_device, ) from .single_file_testing_utils ...
diffusers/tests/single_file/test_stable_diffusion_img2img_single_file.py/0
{ "file_path": "diffusers/tests/single_file/test_stable_diffusion_img2img_single_file.py", "repo_id": "diffusers", "token_count": 1600 }
223
# coding=utf-8 # Copyright 2025 The HuggingFace Inc. team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # """ Utility that checks that mo...
diffusers/utils/check_support_list.py/0
{ "file_path": "diffusers/utils/check_support_list.py", "repo_id": "diffusers", "token_count": 2093 }
224
# coding=utf-8 # Copyright 2021 The HuggingFace Inc. team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
diffusers/utils/tests_fetcher.py/0
{ "file_path": "diffusers/utils/tests_fetcher.py", "repo_id": "diffusers", "token_count": 19563 }
225
<p align="center"> <img alt="LeRobot, Hugging Face Robotics Library" src="https://raw.githubusercontent.com/huggingface/lerobot/main/media/lerobot-logo-thumbnail.png" width="100%"> <br/> <br/> </p> <div align="center"> [![Tests](https://github.com/huggingface/lerobot/actions/workflows/nightly.yml/badge.svg?bran...
lerobot/README.md/0
{ "file_path": "lerobot/README.md", "repo_id": "lerobot", "token_count": 6079 }
226
# HIL-SERL Real Robot Training Workflow Guide In this tutorial you will go through the full Human-in-the-Loop Sample-Efficient Reinforcement Learning (HIL-SERL) workflow using LeRobot. You will master training a policy with RL on a real robot in just a few hours. HIL-SERL is a sample-efficient reinforcement learning ...
lerobot/docs/source/hilserl.mdx/0
{ "file_path": "lerobot/docs/source/hilserl.mdx", "repo_id": "lerobot", "token_count": 11429 }
227
## Paper https://tonyzhaozh.github.io/aloha ## Citation ```bibtex @article{zhao2023learning, title={Learning fine-grained bimanual manipulation with low-cost hardware}, author={Zhao, Tony Z and Kumar, Vikash and Levine, Sergey and Finn, Chelsea}, journal={arXiv preprint arXiv:2304.13705}, year={2023} } ```
lerobot/docs/source/policy_act_README.md/0
{ "file_path": "lerobot/docs/source/policy_act_README.md", "repo_id": "lerobot", "token_count": 113 }
228
# !/usr/bin/env python # Copyright 2025 The HuggingFace Inc. team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # #...
lerobot/examples/lekiwi/replay.py/0
{ "file_path": "lerobot/examples/lekiwi/replay.py", "repo_id": "lerobot", "token_count": 705 }
229
# Copyright 2025 The HuggingFace Inc. team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appl...
lerobot/examples/training/train_with_streaming.py/0
{ "file_path": "lerobot/examples/training/train_with_streaming.py", "repo_id": "lerobot", "token_count": 1505 }
230
#!/usr/bin/env python # Copyright 2024 The HuggingFace Inc. team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # ...
lerobot/src/lerobot/__init__.py/0
{ "file_path": "lerobot/src/lerobot/__init__.py", "repo_id": "lerobot", "token_count": 3211 }
231
#!/usr/bin/env python # Copyright 2024 The HuggingFace Inc. team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # ...
lerobot/src/lerobot/datasets/lerobot_dataset.py/0
{ "file_path": "lerobot/src/lerobot/datasets/lerobot_dataset.py", "repo_id": "lerobot", "token_count": 28376 }
232
from .motors_bus import Motor, MotorCalibration, MotorNormMode, MotorsBus
lerobot/src/lerobot/motors/__init__.py/0
{ "file_path": "lerobot/src/lerobot/motors/__init__.py", "repo_id": "lerobot", "token_count": 21 }
233
#!/usr/bin/env python # Copyright 2024 Tony Z. Zhao and The HuggingFace Inc. team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses...
lerobot/src/lerobot/policies/act/configuration_act.py/0
{ "file_path": "lerobot/src/lerobot/policies/act/configuration_act.py", "repo_id": "lerobot", "token_count": 3350 }
234
#!/usr/bin/env python # Copyright 2025 Physical Intelligence and The HuggingFace Inc. team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org...
lerobot/src/lerobot/policies/pi0/processor_pi0.py/0
{ "file_path": "lerobot/src/lerobot/policies/pi0/processor_pi0.py", "repo_id": "lerobot", "token_count": 2304 }
235
## Paper https://www.nicklashansen.com/td-mpc/ ## Citation ```bibtex @inproceedings{Hansen2022tdmpc, title={Temporal Difference Learning for Model Predictive Control}, author={Nicklas Hansen and Xiaolong Wang and Hao Su}, booktitle={ICML}, year={2022} } ```
lerobot/src/lerobot/policies/tdmpc/README.md/0
{ "file_path": "lerobot/src/lerobot/policies/tdmpc/README.md", "repo_id": "lerobot", "token_count": 97 }
236
#!/usr/bin/env python # Copyright 2025 The HuggingFace Inc. team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # ...
lerobot/src/lerobot/processor/factory.py/0
{ "file_path": "lerobot/src/lerobot/processor/factory.py", "repo_id": "lerobot", "token_count": 810 }
237
# !/usr/bin/env python # Copyright 2025 The HuggingFace Inc. team. # All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 #...
lerobot/src/lerobot/rl/learner.py/0
{ "file_path": "lerobot/src/lerobot/rl/learner.py", "repo_id": "lerobot", "token_count": 17517 }
238
# Copyright 2024 The HuggingFace Inc. team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appl...
lerobot/src/lerobot/robots/koch_follower/config_koch_follower.py/0
{ "file_path": "lerobot/src/lerobot/robots/koch_follower/config_koch_follower.py", "repo_id": "lerobot", "token_count": 414 }
239
# SO-100 In the steps below, we explain how to assemble the SO-100 robot. ## Source the parts Follow this [README](https://github.com/TheRobotStudio/SO-ARM100/blob/main/SO100.md). It contains the bill of materials, with a link to source the parts, as well as the instructions to 3D print the parts. And advise if it's...
lerobot/src/lerobot/robots/so100_follower/so100.mdx/0
{ "file_path": "lerobot/src/lerobot/robots/so100_follower/so100.mdx", "repo_id": "lerobot", "token_count": 6462 }
240
#!/usr/bin/env python # Copyright 2024 The HuggingFace Inc. team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # ...
lerobot/src/lerobot/scripts/lerobot_dataset_viz.py/0
{ "file_path": "lerobot/src/lerobot/scripts/lerobot_dataset_viz.py", "repo_id": "lerobot", "token_count": 4086 }
241
# Copyright 2024 The HuggingFace Inc. team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appl...
lerobot/src/lerobot/teleoperators/teleoperator.py/0
{ "file_path": "lerobot/src/lerobot/teleoperators/teleoperator.py", "repo_id": "lerobot", "token_count": 2463 }
242
#!/usr/bin/env python # Copyright 2024 The HuggingFace Inc. team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # ...
lerobot/src/lerobot/utils/logging_utils.py/0
{ "file_path": "lerobot/src/lerobot/utils/logging_utils.py", "repo_id": "lerobot", "token_count": 2247 }
243
version https://git-lfs.github.com/spec/v1 oid sha256:35723f2db499da3d9d121aa79d2ff4c748effd7c2ea92f277ec543a82fb843ca size 3687117
lerobot/tests/artifacts/datasets/lerobot/aloha_sim_insertion_human/frame_250.safetensors/0
{ "file_path": "lerobot/tests/artifacts/datasets/lerobot/aloha_sim_insertion_human/frame_250.safetensors", "repo_id": "lerobot", "token_count": 66 }
244
#!/usr/bin/env python # Copyright 2024 The HuggingFace Inc. team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # ...
lerobot/tests/artifacts/datasets/save_dataset_to_safetensors.py/0
{ "file_path": "lerobot/tests/artifacts/datasets/save_dataset_to_safetensors.py", "repo_id": "lerobot", "token_count": 1063 }
245
#!/usr/bin/env python # Copyright 2024 The HuggingFace Inc. team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # ...
lerobot/tests/artifacts/policies/save_policy_to_safetensors.py/0
{ "file_path": "lerobot/tests/artifacts/policies/save_policy_to_safetensors.py", "repo_id": "lerobot", "token_count": 2472 }
246
#!/usr/bin/env python # Copyright 2025 The HuggingFace Inc. team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # ...
lerobot/tests/configs/test_plugin_loading.py/0
{ "file_path": "lerobot/tests/configs/test_plugin_loading.py", "repo_id": "lerobot", "token_count": 1154 }
247
# Copyright 2024 The HuggingFace Inc. team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appl...
lerobot/tests/fixtures/files.py/0
{ "file_path": "lerobot/tests/fixtures/files.py", "repo_id": "lerobot", "token_count": 2782 }
248
#!/usr/bin/env python # Copyright 2024 The HuggingFace Inc. team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # ...
lerobot/tests/policies/test_policies.py/0
{ "file_path": "lerobot/tests/policies/test_policies.py", "repo_id": "lerobot", "token_count": 7989 }
249
#!/usr/bin/env python # Copyright 2025 The HuggingFace Inc. team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # ...
lerobot/tests/processor/test_policy_robot_bridge.py/0
{ "file_path": "lerobot/tests/processor/test_policy_robot_bridge.py", "repo_id": "lerobot", "token_count": 6988 }
250
#!/usr/bin/env python # Copyright 2025 The HuggingFace Inc. team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # ...
lerobot/tests/transport/test_transport_utils.py/0
{ "file_path": "lerobot/tests/transport/test_transport_utils.py", "repo_id": "lerobot", "token_count": 7337 }
251
# Model arguments model_name_or_path: Qwen/Qwen2.5-1.5B-Instruct model_revision: main torch_dtype: bfloat16 attn_implementation: flash_attention_2 # Data training arguments dataset_name: open-r1/OpenR1-Math-220k dataset_prompt_column: problem system_prompt: "You are a helpful AI Assistant that provides well-reasoned a...
open-r1/recipes/Qwen2.5-1.5B-Instruct/grpo/config_demo.yaml/0
{ "file_path": "open-r1/recipes/Qwen2.5-1.5B-Instruct/grpo/config_demo.yaml", "repo_id": "open-r1", "token_count": 514 }
252
import argparse from transformers import AutoConfig from math import gcd def get_tensor_parallel_size(model_name: str, revision: str = None, default_tp: int = 8) -> int: try: config = AutoConfig.from_pretrained(model_name, revision=revision, trust_remote_code=True) num_heads = getattr(config, 'num_...
open-r1/scripts/get_tensor_parallel_size.py/0
{ "file_path": "open-r1/scripts/get_tensor_parallel_size.py", "repo_id": "open-r1", "token_count": 448 }
253
# Piston workers (slurm) We have built a [piston](https://github.com/engineer-man/piston) package to run IOI problems. To launch a fleet of piston workers on a slurm cluster, you can adapt the paths in `launch_piston_workers.sh` and `launch_single_piston.sh` and run: ```bash slurm/piston/launch_piston_workers.sh (num...
open-r1/slurm/piston/README.md/0
{ "file_path": "open-r1/slurm/piston/README.md", "repo_id": "open-r1", "token_count": 1361 }
254
import asyncio import os from io import BytesIO from typing import Literal from async_lru import alru_cache from .piston_client import PistonClient from .utils import batched async def score_single_test_case( client: PistonClient, problem_data: dict, test_input: str, test_output: str, submission...
open-r1/src/open_r1/utils/competitive_programming/cf_scoring.py/0
{ "file_path": "open-r1/src/open_r1/utils/competitive_programming/cf_scoring.py", "repo_id": "open-r1", "token_count": 2651 }
255
# Copyright 2025 The HuggingFace Team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
open-r1/tests/slow/test_code_reward.py/0
{ "file_path": "open-r1/tests/slow/test_code_reward.py", "repo_id": "open-r1", "token_count": 3946 }
256
repos: - repo: https://github.com/astral-sh/ruff-pre-commit rev: v0.12.8 hooks: - id: ruff args: - --fix - id: ruff-format - repo: https://github.com/pre-commit/pre-commit-hooks rev: v4.6.0 hooks: - id: check-merge-conflict - id: check-yaml
peft/.pre-commit-config.yaml/0
{ "file_path": "peft/.pre-commit-config.yaml", "repo_id": "peft", "token_count": 158 }
257
<!--Copyright 2023 The HuggingFace Team. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed...
peft/docs/source/conceptual_guides/ia3.md/0
{ "file_path": "peft/docs/source/conceptual_guides/ia3.md", "repo_id": "peft", "token_count": 1031 }
258
<!--Copyright 2023 The HuggingFace Team. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed...
peft/docs/source/package_reference/lokr.md/0
{ "file_path": "peft/docs/source/package_reference/lokr.md", "repo_id": "peft", "token_count": 327 }
259
# Copyright 2023-present the HuggingFace Inc. team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
peft/examples/boft_controlnet/eval.py/0
{ "file_path": "peft/examples/boft_controlnet/eval.py", "repo_id": "peft", "token_count": 3474 }
260
<!--Copyright 2023 The HuggingFace Team. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed...
peft/examples/boft_dreambooth/boft_dreambooth.md/0
{ "file_path": "peft/examples/boft_dreambooth/boft_dreambooth.md", "repo_id": "peft", "token_count": 2789 }
261
<jupyter_start><jupyter_code>from transformers import AutoModelForCausalLM from peft import get_peft_config, get_peft_model, PromptTuningInit, PromptTuningConfig, TaskType, PeftType import torch from datasets import load_dataset import os from transformers import AutoTokenizer from torch.utils.data import DataLoader fr...
peft/examples/causal_language_modeling/peft_prompt_tuning_clm.ipynb/0
{ "file_path": "peft/examples/causal_language_modeling/peft_prompt_tuning_clm.ipynb", "repo_id": "peft", "token_count": 4908 }
262
# Copyright 2024-present the HuggingFace Inc. team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
peft/examples/corda_finetuning/preprocess.py/0
{ "file_path": "peft/examples/corda_finetuning/preprocess.py", "repo_id": "peft", "token_count": 2033 }
263
import os import torch import torch.nn as nn import transformers from datasets import load_dataset from transformers import AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig from peft import LoraConfig, get_peft_model os.environ["CUDA_VISIBLE_DEVICES"] = "0" # force to use CUDA GPU device 0 os.environ["ZE_AF...
peft/examples/fp4_finetuning/finetune_fp4_opt_bnb_peft.py/0
{ "file_path": "peft/examples/fp4_finetuning/finetune_fp4_opt_bnb_peft.py", "repo_id": "peft", "token_count": 2428 }
264
compute_environment: LOCAL_MACHINE debug: false distributed_type: MULTI_XPU downcast_bf16: 'no' enable_cpu_affinity: false gpu_ids: all ipex_config: ipex: false machine_rank: 0 main_training_function: main mixed_precision: 'no' num_machines: 1 num_processes: 4 rdzv_backend: static same_network: true tpu_env: [] tpu_u...
peft/examples/int8_training/config.yaml/0
{ "file_path": "peft/examples/int8_training/config.yaml", "repo_id": "peft", "token_count": 151 }
265
# LoRA-FA: Memory-efficient Low-rank Adaptation for Large Language Models Fine-tuning ## Introduction [LoRA-FA](https://huggingface.co/papers/2308.03303) is a noval Parameter-efficient Fine-tuning method, which freezes the projection down layer (matrix A) during LoRA training process and thus lead to less accelerator...
peft/examples/lorafa_finetune/README.md/0
{ "file_path": "peft/examples/lorafa_finetune/README.md", "repo_id": "peft", "token_count": 1944 }
266
<jupyter_start><jupyter_code>%env CUDA_VISIBLE_DEVICES=0 # force using CUDA GPU device 0 %env ZE_AFFINITY_MASK=0 # force using Intel XPU device 0 %env TOKENIZERS_PARALLELISM=false<jupyter_output>env: CUDA_VISIBLE_DEVICES=0 # force using CUDA GPU device 0 env: ZE_AFFINITY_MASK=0 # force using Intel XPU device 0 env:...
peft/examples/poly/peft_poly_seq2seq_with_generate.ipynb/0
{ "file_path": "peft/examples/poly/peft_poly_seq2seq_with_generate.ipynb", "repo_id": "peft", "token_count": 4174 }
267
<jupyter_start><jupyter_code>import argparse import os import torch from torch.optim import AdamW from torch.utils.data import DataLoader from peft import ( get_peft_config, get_peft_model, get_peft_model_state_dict, set_peft_model_state_dict, PeftType, PrefixTuningConfig, PromptEncoderConf...
peft/examples/sequence_classification/P_Tuning.ipynb/0
{ "file_path": "peft/examples/sequence_classification/P_Tuning.ipynb", "repo_id": "peft", "token_count": 2310 }
268