text
stringlengths
7
324k
id
stringlengths
14
166
metadata
dict
__index_level_0__
int64
0
463
# Copyright 2020 The HuggingFace Datasets Authors. # # 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 ...
datasets/metrics/coval/coval.py/0
{ "file_path": "datasets/metrics/coval/coval.py", "repo_id": "datasets", "token_count": 5731 }
66
# Metric Card for MAE ## Metric Description Mean Absolute Error (MAE) is the mean of the magnitude of difference between the predicted and actual numeric values: ![image](https://user-images.githubusercontent.com/14205986/165824243-e1078dfd-489d-456c-a0da-cbaa28726220.png) ## How to Use At minimum, this metric re...
datasets/metrics/mae/README.md/0
{ "file_path": "datasets/metrics/mae/README.md", "repo_id": "datasets", "token_count": 1421 }
67
# Metric Card for Perplexity ## Metric Description Given a model and an input text sequence, perplexity measures how likely the model is to generate the input text sequence. This can be used in two main ways: 1. to evaluate how well the model has learned the distribution of the text it was trained on - In this cas...
datasets/metrics/perplexity/README.md/0
{ "file_path": "datasets/metrics/perplexity/README.md", "repo_id": "datasets", "token_count": 1345 }
68
# Metric Card for Spearman Correlation Coefficient Metric (spearmanr) ## Metric Description The Spearman rank-order correlation coefficient is a measure of the relationship between two datasets. Like other correlation coefficients, this one varies between -1 and +1 with 0 implying no correlation. Positive correlation...
datasets/metrics/spearmanr/README.md/0
{ "file_path": "datasets/metrics/spearmanr/README.md", "repo_id": "datasets", "token_count": 1585 }
69
# Copyright 2020 The HuggingFace Datasets Authors and the current dataset script contributor. # # 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....
datasets/metrics/wiki_split/wiki_split.py/0
{ "file_path": "datasets/metrics/wiki_split/wiki_split.py", "repo_id": "datasets", "token_count": 5827 }
70
import os import re import shutil from argparse import ArgumentParser, Namespace from datasets.commands import BaseDatasetsCLICommand from datasets.utils.logging import get_logger HIGHLIGHT_MESSAGE_PRE = """<<<<<<< This should probably be modified because it mentions: """ HIGHLIGHT_MESSAGE_POST = """======= >>>>>>>...
datasets/src/datasets/commands/convert.py/0
{ "file_path": "datasets/src/datasets/commands/convert.py", "repo_id": "datasets", "token_count": 3822 }
71
# ruff: noqa __all__ = [ "Audio", "Array2D", "Array3D", "Array4D", "Array5D", "ClassLabel", "Features", "Sequence", "Value", "Image", "Translation", "TranslationVariableLanguages", ] from .audio import Audio from .features import Array2D, Array3D, Array4D, Array5D, Class...
datasets/src/datasets/features/__init__.py/0
{ "file_path": "datasets/src/datasets/features/__init__.py", "repo_id": "datasets", "token_count": 165 }
72
# Copyright 2020 The HuggingFace Datasets Authors and the TensorFlow Datasets Authors. # # 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...
datasets/src/datasets/info.py/0
{ "file_path": "datasets/src/datasets/info.py", "repo_id": "datasets", "token_count": 11409 }
73
import inspect import re from typing import Dict, List, Tuple from huggingface_hub.utils import insecure_hashlib from .arrow import arrow from .audiofolder import audiofolder from .cache import cache # noqa F401 from .csv import csv from .imagefolder import imagefolder from .json import json from .pandas import pand...
datasets/src/datasets/packaged_modules/__init__.py/0
{ "file_path": "datasets/src/datasets/packaged_modules/__init__.py", "repo_id": "datasets", "token_count": 1108 }
74
import io import itertools import json from dataclasses import dataclass from typing import Optional import pyarrow as pa import pyarrow.json as paj import datasets from datasets.table import table_cast from datasets.utils.file_utils import readline logger = datasets.utils.logging.get_logger(__name__) @dataclass ...
datasets/src/datasets/packaged_modules/json/json.py/0
{ "file_path": "datasets/src/datasets/packaged_modules/json/json.py", "repo_id": "datasets", "token_count": 5320 }
75
import importlib.util import os import tempfile from pathlib import PurePath from typing import TYPE_CHECKING, Dict, List, NamedTuple, Optional, Union import fsspec import numpy as np from .utils import logging from .utils import tqdm as hf_tqdm if TYPE_CHECKING: from .arrow_dataset import Dataset # noqa: F401...
datasets/src/datasets/search.py/0
{ "file_path": "datasets/src/datasets/search.py", "repo_id": "datasets", "token_count": 15237 }
76
#!/usr/bin/env python # coding=utf-8 # Copyright 2023 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/LI...
datasets/src/datasets/utils/_filelock.py/0
{ "file_path": "datasets/src/datasets/utils/_filelock.py", "repo_id": "datasets", "token_count": 903 }
77
# Copyright 2020 The HuggingFace Datasets Authors and the current dataset script contributor. # # 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....
datasets/templates/new_dataset_script.py/0
{ "file_path": "datasets/templates/new_dataset_script.py", "repo_id": "datasets", "token_count": 3156 }
78
import contextlib import os import sqlite3 import pytest from datasets import Dataset, Features, Value from datasets.io.sql import SqlDatasetReader, SqlDatasetWriter from ..utils import assert_arrow_memory_doesnt_increase, assert_arrow_memory_increases, require_sqlalchemy def _check_sql_dataset(dataset, expected_f...
datasets/tests/io/test_sql.py/0
{ "file_path": "datasets/tests/io/test_sql.py", "repo_id": "datasets", "token_count": 1628 }
79
import importlib import os import tempfile import types from contextlib import nullcontext as does_not_raise from multiprocessing import Process from pathlib import Path from unittest import TestCase from unittest.mock import patch import numpy as np import pyarrow as pa import pyarrow.parquet as pq import pytest from...
datasets/tests/test_builder.py/0
{ "file_path": "datasets/tests/test_builder.py", "repo_id": "datasets", "token_count": 26111 }
80
import pytest import datasets.config from datasets.utils.info_utils import is_small_dataset @pytest.mark.parametrize("dataset_size", [None, 400 * 2**20, 600 * 2**20]) @pytest.mark.parametrize("input_in_memory_max_size", ["default", 0, 100 * 2**20, 900 * 2**20]) def test_is_small_dataset(dataset_size, input_in_memory...
datasets/tests/test_info_utils.py/0
{ "file_path": "datasets/tests/test_info_utils.py", "repo_id": "datasets", "token_count": 366 }
81
import copy import pickle from typing import List, Union import numpy as np import pyarrow as pa import pytest from datasets import Sequence, Value from datasets.features.features import Array2D, Array2DExtensionType, ClassLabel, Features, Image, get_nested_type from datasets.table import ( ConcatenationTable, ...
datasets/tests/test_table.py/0
{ "file_path": "datasets/tests/test_table.py", "repo_id": "datasets", "token_count": 21863 }
82
<jupyter_start><jupyter_text>Unit 1: Train your first Deep Reinforcement Learning Agent 🤖In this notebook, you'll train your **first Deep Reinforcement Learning agent** a Lunar Lander agent that will learn to **land correctly on the Moon 🌕**. Using [Stable-Baselines3](https://stable-baselines3.readthedocs.io/en/maste...
deep-rl-class/notebooks/unit1/unit1.ipynb/0
{ "file_path": "deep-rl-class/notebooks/unit1/unit1.ipynb", "repo_id": "deep-rl-class", "token_count": 7618 }
83
# Welcome to the 🤗 Deep Reinforcement Learning Course [[introduction]] <img src="https://huggingface.co/datasets/huggingface-deep-rl-course/course-images/resolve/main/en/unit0/thumbnail.jpg" alt="Deep RL Course thumbnail" width="100%"/> Welcome to the most fascinating topic in Artificial Intelligence: **Deep Reinfor...
deep-rl-class/units/en/unit0/introduction.mdx/0
{ "file_path": "deep-rl-class/units/en/unit0/introduction.mdx", "repo_id": "deep-rl-class", "token_count": 2554 }
84
# The Bellman Equation: simplify our value estimation [[bellman-equation]] The Bellman equation **simplifies our state value or state-action value calculation.** <img src="https://huggingface.co/datasets/huggingface-deep-rl-course/course-images/resolve/main/en/unit3/bellman.jpg" alt="Bellman equation"/> With what w...
deep-rl-class/units/en/unit2/bellman-equation.mdx/0
{ "file_path": "deep-rl-class/units/en/unit2/bellman-equation.mdx", "repo_id": "deep-rl-class", "token_count": 1247 }
85
# The Deep Q-Learning Algorithm [[deep-q-algorithm]] We learned that Deep Q-Learning **uses a deep neural network to approximate the different Q-values for each possible action at a state** (value-function estimation). The difference is that, during the training phase, instead of updating the Q-value of a state-actio...
deep-rl-class/units/en/unit3/deep-q-algorithm.mdx/0
{ "file_path": "deep-rl-class/units/en/unit3/deep-q-algorithm.mdx", "repo_id": "deep-rl-class", "token_count": 2281 }
86
# What are the policy-based methods? The main goal of Reinforcement learning is to **find the optimal policy \\(\pi^{*}\\) that will maximize the expected cumulative reward**. Because Reinforcement Learning is based on the *reward hypothesis*: **all goals can be described as the maximization of the expected cumulative...
deep-rl-class/units/en/unit4/what-are-policy-based-methods.mdx/0
{ "file_path": "deep-rl-class/units/en/unit4/what-are-policy-based-methods.mdx", "repo_id": "deep-rl-class", "token_count": 1034 }
87
# The Problem of Variance in Reinforce [[the-problem-of-variance-in-reinforce]] In Reinforce, we want to **increase the probability of actions in a trajectory proportionally to how high the return is**. <img src="https://huggingface.co/datasets/huggingface-deep-rl-course/course-images/resolve/main/en/unit8/pg.jpg" ...
deep-rl-class/units/en/unit6/variance-problem.mdx/0
{ "file_path": "deep-rl-class/units/en/unit6/variance-problem.mdx", "repo_id": "deep-rl-class", "token_count": 711 }
88
# Introduction [[introduction]] <img src="https://huggingface.co/datasets/huggingface-deep-rl-course/course-images/resolve/main/en/unit9/thumbnail.png" alt="Unit 8"/> In Unit 6, we learned about Advantage Actor Critic (A2C), a hybrid architecture combining value-based and policy-based methods that helps to stabilize ...
deep-rl-class/units/en/unit8/introduction.mdx/0
{ "file_path": "deep-rl-class/units/en/unit8/introduction.mdx", "repo_id": "deep-rl-class", "token_count": 533 }
89
# Introduction <img src="https://huggingface.co/datasets/huggingface-deep-rl-course/course-images/resolve/main/en/unit12/thumbnail.png" alt="Unit bonus 3 thumbnail"/> Congratulations on finishing this course! **You now have a solid background in Deep Reinforcement Learning**. But this course was just the beginning o...
deep-rl-class/units/en/unitbonus3/introduction.mdx/0
{ "file_path": "deep-rl-class/units/en/unitbonus3/introduction.mdx", "repo_id": "deep-rl-class", "token_count": 171 }
90
import argparse import sys sys.path.append(".") from base_classes import LCMLoRATextToImageBenchmark # noqa: E402 if __name__ == "__main__": parser = argparse.ArgumentParser() parser.add_argument( "--ckpt", type=str, default="stabilityai/stable-diffusion-xl-base-1.0", ) pars...
diffusers/benchmarks/benchmark_t2i_lcm_lora.py/0
{ "file_path": "diffusers/benchmarks/benchmark_t2i_lcm_lora.py", "repo_id": "diffusers", "token_count": 273 }
91
- sections: - local: index title: 🧨 Diffusers - local: quicktour title: Quicktour - local: stable_diffusion title: Effective and efficient diffusion - local: installation title: Installation title: Get started - sections: - local: tutorials/tutorial_overview title: Overview - local: u...
diffusers/docs/source/en/_toctree.yml/0
{ "file_path": "diffusers/docs/source/en/_toctree.yml", "repo_id": "diffusers", "token_count": 6273 }
92
<!--Copyright 2024 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...
diffusers/docs/source/en/api/models/consistency_decoder_vae.md/0
{ "file_path": "diffusers/docs/source/en/api/models/consistency_decoder_vae.md", "repo_id": "diffusers", "token_count": 383 }
93
<!--Copyright 2024 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 to...
diffusers/docs/source/en/api/pipelines/kandinsky.md/0
{ "file_path": "diffusers/docs/source/en/api/pipelines/kandinsky.md", "repo_id": "diffusers", "token_count": 850 }
94
<!--Copyright 2024 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...
diffusers/docs/source/en/api/pipelines/stable_cascade.md/0
{ "file_path": "diffusers/docs/source/en/api/pipelines/stable_cascade.md", "repo_id": "diffusers", "token_count": 2836 }
95
<!--Copyright 2024 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...
diffusers/docs/source/en/optimization/deepcache.md/0
{ "file_path": "diffusers/docs/source/en/optimization/deepcache.md", "repo_id": "diffusers", "token_count": 1912 }
96
<!--Copyright 2024 Custom Diffusion authors 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...
diffusers/docs/source/en/training/custom_diffusion.md/0
{ "file_path": "diffusers/docs/source/en/training/custom_diffusion.md", "repo_id": "diffusers", "token_count": 5470 }
97
<!--Copyright 2024 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...
diffusers/docs/source/en/tutorials/basic_training.md/0
{ "file_path": "diffusers/docs/source/en/tutorials/basic_training.md", "repo_id": "diffusers", "token_count": 6186 }
98
<!--Copyright 2024 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...
diffusers/docs/source/en/using-diffusers/img2img.md/0
{ "file_path": "diffusers/docs/source/en/using-diffusers/img2img.md", "repo_id": "diffusers", "token_count": 9649 }
99
<!--Copyright 2024 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...
diffusers/docs/source/en/using-diffusers/reusing_seeds.md/0
{ "file_path": "diffusers/docs/source/en/using-diffusers/reusing_seeds.md", "repo_id": "diffusers", "token_count": 1099 }
100
<!--Copyright 2024 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...
diffusers/docs/source/ja/quicktour.md/0
{ "file_path": "diffusers/docs/source/ja/quicktour.md", "repo_id": "diffusers", "token_count": 7835 }
101
<!--Copyright 2024 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...
diffusers/docs/source/ko/optimization/tome.md/0
{ "file_path": "diffusers/docs/source/ko/optimization/tome.md", "repo_id": "diffusers", "token_count": 4366 }
102
<!--Copyright 2024 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...
diffusers/docs/source/ko/training/unconditional_training.md/0
{ "file_path": "diffusers/docs/source/ko/training/unconditional_training.md", "repo_id": "diffusers", "token_count": 3095 }
103
<!--Copyright 2024 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...
diffusers/docs/source/ko/using-diffusers/reproducibility.md/0
{ "file_path": "diffusers/docs/source/ko/using-diffusers/reproducibility.md", "repo_id": "diffusers", "token_count": 6163 }
104
<!--Copyright 2024 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...
diffusers/docs/source/zh/quicktour.md/0
{ "file_path": "diffusers/docs/source/zh/quicktour.md", "repo_id": "diffusers", "token_count": 8423 }
105
# Copyright 2022 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/examples/community/ddim_noise_comparative_analysis.py/0
{ "file_path": "diffusers/examples/community/ddim_noise_comparative_analysis.py", "repo_id": "diffusers", "token_count": 3417 }
106
## ---------------------------------------------------------- # A SDXL pipeline can take unlimited weighted prompt # # Author: Andrew Zhu # Github: https://github.com/xhinker # Medium: https://medium.com/@xhinker ## ----------------------------------------------------------- import inspect import os from typing import...
diffusers/examples/community/lpw_stable_diffusion_xl.py/0
{ "file_path": "diffusers/examples/community/lpw_stable_diffusion_xl.py", "repo_id": "diffusers", "token_count": 47271 }
107
# Copyright 2024 TencentARC 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/examples/community/pipeline_stable_diffusion_xl_controlnet_adapter.py/0
{ "file_path": "diffusers/examples/community/pipeline_stable_diffusion_xl_controlnet_adapter.py", "repo_id": "diffusers", "token_count": 32940 }
108
# Inspired by: https://github.com/haofanwang/ControlNet-for-Diffusers/ import inspect from typing import Any, Callable, Dict, List, Optional, Tuple, Union import numpy as np import PIL.Image import torch import torch.nn.functional as F from transformers import CLIPImageProcessor, CLIPTextModel, CLIPTokenizer from di...
diffusers/examples/community/stable_diffusion_controlnet_inpaint.py/0
{ "file_path": "diffusers/examples/community/stable_diffusion_controlnet_inpaint.py", "repo_id": "diffusers", "token_count": 23711 }
109
import inspect import os import random import re from dataclasses import dataclass from typing import Callable, Dict, List, Optional, Union import torch from transformers import CLIPImageProcessor, CLIPTextModel, CLIPTokenizer from diffusers.configuration_utils import FrozenDict from diffusers.models import Autoencod...
diffusers/examples/community/wildcard_stable_diffusion.py/0
{ "file_path": "diffusers/examples/community/wildcard_stable_diffusion.py", "repo_id": "diffusers", "token_count": 9011 }
110
# coding=utf-8 # Copyright 2024 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/examples/controlnet/test_controlnet.py/0
{ "file_path": "diffusers/examples/controlnet/test_controlnet.py", "repo_id": "diffusers", "token_count": 2010 }
111
# coding=utf-8 # Copyright 2024 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/examples/dreambooth/test_dreambooth_lora_edm.py/0
{ "file_path": "diffusers/examples/dreambooth/test_dreambooth_lora_edm.py", "repo_id": "diffusers", "token_count": 1864 }
112
#!/usr/bin/env python # coding=utf-8 # 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/LI...
diffusers/examples/kandinsky2_2/text_to_image/train_text_to_image_decoder.py/0
{ "file_path": "diffusers/examples/kandinsky2_2/text_to_image/train_text_to_image_decoder.py", "repo_id": "diffusers", "token_count": 16368 }
113
## Diffusers examples with Intel optimizations **This research project is not actively maintained by the diffusers team. For any questions or comments, please make sure to tag @hshen14 .** This aims to provide diffusers examples with Intel optimizations such as Bfloat16 for training/fine-tuning acceleration and 8-bit...
diffusers/examples/research_projects/intel_opts/README.md/0
{ "file_path": "diffusers/examples/research_projects/intel_opts/README.md", "repo_id": "diffusers", "token_count": 528 }
114
#!/usr/bin/env python # coding=utf-8 # 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/LI...
diffusers/examples/text_to_image/train_text_to_image_lora_sdxl.py/0
{ "file_path": "diffusers/examples/text_to_image/train_text_to_image_lora_sdxl.py", "repo_id": "diffusers", "token_count": 24929 }
115
#!/usr/bin/env python3 import argparse import math import os from copy import deepcopy import requests import torch from audio_diffusion.models import DiffusionAttnUnet1D from diffusion import sampling from torch import nn from diffusers import DanceDiffusionPipeline, IPNDMScheduler, UNet1DModel MODELS_MAP = { ...
diffusers/scripts/convert_dance_diffusion_to_diffusers.py/0
{ "file_path": "diffusers/scripts/convert_dance_diffusion_to_diffusers.py", "repo_id": "diffusers", "token_count": 4637 }
116
# coding=utf-8 # Copyright 2024 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/scripts/convert_ms_text_to_video_to_diffusers.py/0
{ "file_path": "diffusers/scripts/convert_ms_text_to_video_to_diffusers.py", "repo_id": "diffusers", "token_count": 8414 }
117
from diffusers.utils import is_accelerate_available, logging if is_accelerate_available(): pass logger = logging.get_logger(__name__) # pylint: disable=invalid-name def create_unet_diffusers_config(original_config, image_size: int, controlnet=False): """ Creates a config for the diffusers based on the...
diffusers/scripts/convert_svd_to_diffusers.py/0
{ "file_path": "diffusers/scripts/convert_svd_to_diffusers.py", "repo_id": "diffusers", "token_count": 14781 }
118
# Copyright 2024 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/commands/env.py/0
{ "file_path": "diffusers/src/diffusers/commands/env.py", "repo_id": "diffusers", "token_count": 1069 }
119
# coding=utf-8 # Copyright 2024 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/loaders/peft.py/0
{ "file_path": "diffusers/src/diffusers/loaders/peft.py", "repo_id": "diffusers", "token_count": 3289 }
120
# Copyright 2024 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/autoencoders/autoencoder_kl_temporal_decoder.py/0
{ "file_path": "diffusers/src/diffusers/models/autoencoders/autoencoder_kl_temporal_decoder.py", "repo_id": "diffusers", "token_count": 7179 }
121
# coding=utf-8 # Copyright 2024 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/src/diffusers/models/normalization.py/0
{ "file_path": "diffusers/src/diffusers/models/normalization.py", "repo_id": "diffusers", "token_count": 4029 }
122
# Copyright 2024 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/unet_2d_blocks.py/0
{ "file_path": "diffusers/src/diffusers/models/unet_2d_blocks.py", "repo_id": "diffusers", "token_count": 7248 }
123
# Copyright 2024 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_stable_cascade.py/0
{ "file_path": "diffusers/src/diffusers/models/unets/unet_stable_cascade.py", "repo_id": "diffusers", "token_count": 14544 }
124
from typing import TYPE_CHECKING from ...utils import ( DIFFUSERS_SLOW_IMPORT, OptionalDependencyNotAvailable, _LazyModule, is_torch_available, is_transformers_available, is_transformers_version, ) _dummy_objects = {} _import_structure = {} try: if not (is_transformers_available() and is...
diffusers/src/diffusers/pipelines/audioldm/__init__.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/audioldm/__init__.py", "repo_id": "diffusers", "token_count": 581 }
125
# Copyright 2024 Salesforce.com, inc. # Copyright 2024 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": 7632 }
126
# Copyright 2024 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/deprecated/audio_diffusion/mel.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/deprecated/audio_diffusion/mel.py", "repo_id": "diffusers", "token_count": 2698 }
127
from typing import TYPE_CHECKING from ...utils import DIFFUSERS_SLOW_IMPORT, _LazyModule _import_structure = {"pipeline_dit": ["DiTPipeline"]} if TYPE_CHECKING or DIFFUSERS_SLOW_IMPORT: from .pipeline_dit import DiTPipeline else: import sys sys.modules[__name__] = _LazyModule( __name__, ...
diffusers/src/diffusers/pipelines/dit/__init__.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/dit/__init__.py", "repo_id": "diffusers", "token_count": 177 }
128
# Copyright 2024 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_controlnet_img2img.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/kandinsky2_2/pipeline_kandinsky2_2_controlnet_img2img.py", "repo_id": "diffusers", "token_count": 7538 }
129
import inspect import math from itertools import repeat from typing import Any, Callable, Dict, List, Optional, Tuple, Union import torch import torch.nn.functional as F from packaging import version from transformers import CLIPImageProcessor, CLIPTextModel, CLIPTokenizer from ...configuration_utils import FrozenDic...
diffusers/src/diffusers/pipelines/ledits_pp/pipeline_leditspp_stable_diffusion.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/ledits_pp/pipeline_leditspp_stable_diffusion.py", "repo_id": "diffusers", "token_count": 35679 }
130
# Copyright 2024 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_flax_stable_diffusion.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/stable_diffusion/pipeline_flax_stable_diffusion.py", "repo_id": "diffusers", "token_count": 9012 }
131
# Copyright 2024 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_unclip.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/stable_diffusion/pipeline_stable_unclip.py", "repo_id": "diffusers", "token_count": 19693 }
132
import numpy as np import torch from ...utils import is_invisible_watermark_available if is_invisible_watermark_available(): from imwatermark import WatermarkEncoder # Copied from https://github.com/Stability-AI/generative-models/blob/613af104c6b85184091d42d374fef420eddb356d/scripts/demo/streamlit_helpers.py#L...
diffusers/src/diffusers/pipelines/stable_diffusion_xl/watermark.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/stable_diffusion_xl/watermark.py", "repo_id": "diffusers", "token_count": 509 }
133
from typing import TYPE_CHECKING from ...utils import ( DIFFUSERS_SLOW_IMPORT, OptionalDependencyNotAvailable, _LazyModule, is_torch_available, is_transformers_available, ) _dummy_objects = {} _import_structure = {} try: if not (is_transformers_available() and is_torch_available()): ...
diffusers/src/diffusers/pipelines/unidiffuser/__init__.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/unidiffuser/__init__.py", "repo_id": "diffusers", "token_count": 733 }
134
# Copyright 2024 NVIDIA 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 required b...
diffusers/src/diffusers/schedulers/deprecated/scheduling_karras_ve.py/0
{ "file_path": "diffusers/src/diffusers/schedulers/deprecated/scheduling_karras_ve.py", "repo_id": "diffusers", "token_count": 4089 }
135
# Copyright 2024 Zhejiang 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_pndm.py/0
{ "file_path": "diffusers/src/diffusers/schedulers/scheduling_pndm.py", "repo_id": "diffusers", "token_count": 9459 }
136
import inspect import warnings from typing import Any, Dict, Optional, Union from packaging import version def deprecate(*args, take_from: Optional[Union[Dict, Any]] = None, standard_warn=True, stacklevel=2): from .. import __version__ deprecated_kwargs = take_from values = () if not isinstance(args...
diffusers/src/diffusers/utils/deprecation_utils.py/0
{ "file_path": "diffusers/src/diffusers/utils/deprecation_utils.py", "repo_id": "diffusers", "token_count": 793 }
137
# coding=utf-8 # Copyright 2024 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/utils/hub_utils.py/0
{ "file_path": "diffusers/src/diffusers/utils/hub_utils.py", "repo_id": "diffusers", "token_count": 9131 }
138
# coding=utf-8 # Copyright 2024 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/unets/test_models_unet_2d.py/0
{ "file_path": "diffusers/tests/models/unets/test_models_unet_2d.py", "repo_id": "diffusers", "token_count": 5100 }
139
import pickle as pkl import unittest from dataclasses import dataclass from typing import List, Union import numpy as np import PIL.Image from diffusers.utils.outputs import BaseOutput from diffusers.utils.testing_utils import require_torch @dataclass class CustomOutput(BaseOutput): images: Union[List[PIL.Image...
diffusers/tests/others/test_outputs.py/0
{ "file_path": "diffusers/tests/others/test_outputs.py", "repo_id": "diffusers", "token_count": 1506 }
140
# coding=utf-8 # Copyright 2024 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/blipdiffusion/test_blipdiffusion.py/0
{ "file_path": "diffusers/tests/pipelines/blipdiffusion/test_blipdiffusion.py", "repo_id": "diffusers", "token_count": 3065 }
141
# coding=utf-8 # Copyright 2024 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/kandinsky/test_kandinsky_combined.py/0
{ "file_path": "diffusers/tests/pipelines/kandinsky/test_kandinsky_combined.py", "repo_id": "diffusers", "token_count": 5548 }
142
# coding=utf-8 # Copyright 2024 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_inpaint.py/0
{ "file_path": "diffusers/tests/pipelines/stable_diffusion/test_onnx_stable_diffusion_inpaint.py", "repo_id": "diffusers", "token_count": 2242 }
143
# coding=utf-8 # Copyright 2024 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_2/test_stable_diffusion_v_pred.py/0
{ "file_path": "diffusers/tests/pipelines/stable_diffusion_2/test_stable_diffusion_v_pred.py", "repo_id": "diffusers", "token_count": 10152 }
144
# coding=utf-8 # Copyright 2024 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_safe/test_safe_diffusion.py/0
{ "file_path": "diffusers/tests/pipelines/stable_diffusion_safe/test_safe_diffusion.py", "repo_id": "diffusers", "token_count": 7442 }
145
# coding=utf-8 # Copyright 2024 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": 38900 }
146
import tempfile import unittest import torch from diffusers import ( EDMDPMSolverMultistepScheduler, ) from .test_schedulers import SchedulerCommonTest class EDMDPMSolverMultistepSchedulerTest(SchedulerCommonTest): scheduler_classes = (EDMDPMSolverMultistepScheduler,) forward_default_kwargs = (("num_in...
diffusers/tests/schedulers/test_scheduler_edm_dpmsolver_multistep.py/0
{ "file_path": "diffusers/tests/schedulers/test_scheduler_edm_dpmsolver_multistep.py", "repo_id": "diffusers", "token_count": 5436 }
147
import tempfile import torch from diffusers import ( DEISMultistepScheduler, DPMSolverMultistepScheduler, DPMSolverSinglestepScheduler, UniPCMultistepScheduler, ) from .test_schedulers import SchedulerCommonTest class UniPCMultistepSchedulerTest(SchedulerCommonTest): scheduler_classes = (UniPCM...
diffusers/tests/schedulers/test_scheduler_unipc.py/0
{ "file_path": "diffusers/tests/schedulers/test_scheduler_unipc.py", "repo_id": "diffusers", "token_count": 6988 }
148
#!/usr/bin/env python3 # coding=utf-8 # Copyright 2024 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 # # Unles...
diffusers/utils/print_env.py/0
{ "file_path": "diffusers/utils/print_env.py", "repo_id": "diffusers", "token_count": 424 }
149
# Stable Diffusion Deep Dive <CourseFloatingBanner unit={3} classNames="absolute z-10 right-0 top-0" notebooks={[ {label: "Stable Diffusion Deep Dive", value: "https://colab.research.google.com/github/huggingface/diffusion-models-class/blob/main/units/en/unit3/stable_diffusion_deep_dive.ipynb"}, {label: "S...
diffusion-models-class/units/en/unit3/3.mdx/0
{ "file_path": "diffusion-models-class/units/en/unit3/3.mdx", "repo_id": "diffusion-models-class", "token_count": 20868 }
150
# Sprint ControlNet en JAX/Diffusers Bienvenue au sprint communautaire en JAX/Diffusers ! L'objectif de ce sprint est de travailler sur des modèles de diffusion amusants et créatifs en utilisant JAX et Diffusers. Lors de cet événement, nous créerons diverses applications avec des modèles de diffusion en JAX/Flax et D...
diffusion-models-class/units/fr/events/4.mdx/0
{ "file_path": "diffusion-models-class/units/fr/events/4.mdx", "repo_id": "diffusion-models-class", "token_count": 15277 }
151
<jupyter_start><jupyter_text>Recherche sémantique avec FAISS (PyTorch) Installez les bibliothèques 🤗 Transformers et 🤗 Datasets pour exécuter ce *notebook*.<jupyter_code>!pip install datasets evaluate transformers[sentencepiece] !pip install faiss-gpu from huggingface_hub import hf_hub_url data_files = hf_hub_url( ...
notebooks/course/fr/chapter5/section6_pt.ipynb/0
{ "file_path": "notebooks/course/fr/chapter5/section6_pt.ipynb", "repo_id": "notebooks", "token_count": 1233 }
152
<jupyter_start><jupyter_text>Finetuner un modèle de language masqué (TensorFlow) Installez les bibliothèques 🤗 *Datasets* et 🤗 *Transformers* pour exécuter ce *notebook*.<jupyter_code>!pip install datasets transformers[sentencepiece] !apt install git-lfs<jupyter_output><empty_output><jupyter_text>Vous aurez besoin de...
notebooks/course/fr/chapter7/section3_tf.ipynb/0
{ "file_path": "notebooks/course/fr/chapter7/section3_tf.ipynb", "repo_id": "notebooks", "token_count": 2949 }
153
<jupyter_start><jupyter_text>Comprendre la classe Interface Installez les bibliothèques 🤗 Transformers et 🤗 Gradio pour exécuter ce *notebook*.<jupyter_code>!pip install datasets transformers[sentencepiece] !pip install gradio import numpy as np import gradio as gr def reverse_audio(audio): sr, data = audio ...
notebooks/course/fr/chapter9/section3.ipynb/0
{ "file_path": "notebooks/course/fr/chapter9/section3.ipynb", "repo_id": "notebooks", "token_count": 759 }
154
<jupyter_start><jupyter_text>Image super-resolution using Latent Diffusion This colab notebook shows how to use the Latent Diffusion image super-resolution model using 🧨 [diffusers](https://github.com/huggingface/diffusers) libray.The model was originally released in [Latent Diffusion repo](https://github.com/CompVis/...
notebooks/diffusers/latent_diffusion_upscaler.ipynb/0
{ "file_path": "notebooks/diffusers/latent_diffusion_upscaler.ipynb", "repo_id": "notebooks", "token_count": 656 }
155
# adapted from https://github.com/huggingface/notebooks/blob/main/transformers_doc/en/pytorch/image_captioning.ipynb # This example demonstrates normal finetuning (w/o peft) - for the sake of keeping the memory # requirements small it freezes the original pre-trained text and image layers to keep the memory # requirem...
notebooks/examples/idefics/finetune_image_captioning.py/0
{ "file_path": "notebooks/examples/idefics/finetune_image_captioning.py", "repo_id": "notebooks", "token_count": 1670 }
156
<jupyter_start><jupyter_text>If you're opening this Notebook on colab, you will probably need to install 🤗 Transformers as well as some other libraries. Uncomment the following cell and run it.<jupyter_code># Install !pip install -q biopython transformers datasets huggingface_hub accelerate peft<jupyter_output> ...
notebooks/examples/nucleotide_transformer_dna_sequence_modelling_with_peft.ipynb/0
{ "file_path": "notebooks/examples/nucleotide_transformer_dna_sequence_modelling_with_peft.ipynb", "repo_id": "notebooks", "token_count": 8292 }
157
<jupyter_start><jupyter_text>How to fine-tune a T5 model with ONNX RuntimeThis notebook is largely inspired by the summarization [notebook of Transformers](https://github.com/huggingface/notebooks/blob/main/examples/summarization.ipynb) which takes PyTorch as backend for fine tuning.Here you will use the `ORTSeq2SeqTra...
notebooks/examples/summarization_ort.ipynb/0
{ "file_path": "notebooks/examples/summarization_ort.ipynb", "repo_id": "notebooks", "token_count": 6048 }
158
<jupyter_start><jupyter_text>Getting started with Owl-ViTIn this notebook, we are going to run the [OWL-ViT](https://arxiv.org/abs/2205.06230) model (an open-vocabulary object detection model) by Google Research on scikit-image samples images. OWL-ViT: A Quick IntroOWL-ViT is an open-vocabulary object detector. Given ...
notebooks/examples/zeroshot_object_detection_with_owlvit.ipynb/0
{ "file_path": "notebooks/examples/zeroshot_object_detection_with_owlvit.ipynb", "repo_id": "notebooks", "token_count": 4929 }
159
import argparse import logging import os import random import sys from datasets import load_from_disk from sklearn.metrics import accuracy_score, precision_recall_fscore_support import torch from transformers import AutoModelForSequenceClassification, Trainer, TrainingArguments, AutoTokenizer if __name__ == "__main_...
notebooks/sagemaker/06_sagemaker_metrics/scripts/train.py/0
{ "file_path": "notebooks/sagemaker/06_sagemaker_metrics/scripts/train.py", "repo_id": "notebooks", "token_count": 1415 }
160
# SageMaker push to hf.co/models example
notebooks/sagemaker/14_train_and_push_to_hub/README.md/0
{ "file_path": "notebooks/sagemaker/14_train_and_push_to_hub/README.md", "repo_id": "notebooks", "token_count": 12 }
161
<!--Copyright 2024 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/developer_guides/model_merging.md/0
{ "file_path": "peft/docs/source/developer_guides/model_merging.md", "repo_id": "peft", "token_count": 2263 }
162
import gc import os import sys import threading import psutil import torch from accelerate import Accelerator from datasets import load_dataset from torch.utils.data import DataLoader from tqdm import tqdm from transformers import ( AutoModelForCausalLM, AutoTokenizer, default_data_collator, get_linear...
peft/examples/causal_language_modeling/peft_lora_clm_accelerate_ds_zero3_offload.py/0
{ "file_path": "peft/examples/causal_language_modeling/peft_lora_clm_accelerate_ds_zero3_offload.py", "repo_id": "peft", "token_count": 6919 }
163
# 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/loftq_finetuning/train_gsm8k_llama.py/0
{ "file_path": "peft/examples/loftq_finetuning/train_gsm8k_llama.py", "repo_id": "peft", "token_count": 14574 }
164
<jupyter_start><jupyter_text>IntroductionIn this notebook, we will learn how to use [LoRA](https://arxiv.org/abs/2106.09685) from 🤗 PEFT to fine-tune a SegFormer model variant for semantic segmentation by ONLY using **14%** of the original trainable parameters of the model. LoRA adds low-rank "update matrices" to cert...
peft/examples/semantic_segmentation/semantic_segmentation_peft_lora.ipynb/0
{ "file_path": "peft/examples/semantic_segmentation/semantic_segmentation_peft_lora.ipynb", "repo_id": "peft", "token_count": 8322 }
165