text
stringlengths
7
328k
id
stringlengths
14
166
metadata
dict
__index_level_0__
int64
0
471
# This first_section was backported from nginx loading_datasets: loading share_dataset: share quicktour: quickstart dataset_streaming: stream torch_tensorflow: use_dataset splits: loading#slice-splits processing: process faiss_and_ea: faiss_es features: about_dataset_features using_metrics: how_to_metrics exploring: ac...
datasets/docs/source/_redirects.yml/0
{ "file_path": "datasets/docs/source/_redirects.yml", "repo_id": "datasets", "token_count": 134 }
63
# Create a dataset card Each dataset should have a dataset card to promote responsible usage and inform users of any potential biases within the dataset. This idea was inspired by the Model Cards proposed by [Mitchell, 2018](https://arxiv.org/abs/1810.03993). Dataset cards help users understand a dataset's contents, t...
datasets/docs/source/dataset_card.mdx/0
{ "file_path": "datasets/docs/source/dataset_card.mdx", "repo_id": "datasets", "token_count": 757 }
64
# Load Your data can be stored in various places; they can be on your local machine's disk, in a Github repository, and in in-memory data structures like Python dictionaries and Pandas DataFrames. Wherever a dataset is stored, 🤗 Datasets can help you load it. This guide will show you how to load a dataset from: - T...
datasets/docs/source/loading.mdx/0
{ "file_path": "datasets/docs/source/loading.mdx", "repo_id": "datasets", "token_count": 7158 }
65
# Stream Dataset streaming lets you work with a dataset without downloading it. The data is streamed as you iterate over the dataset. This is especially helpful when: - You don't want to wait for an extremely large dataset to download. - The dataset size exceeds the amount of available disk space on your computer. - ...
datasets/docs/source/stream.mdx/0
{ "file_path": "datasets/docs/source/stream.mdx", "repo_id": "datasets", "token_count": 5324 }
66
# 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/bleu/bleu.py/0
{ "file_path": "datasets/metrics/bleu/bleu.py", "repo_id": "datasets", "token_count": 2139 }
67
# Metric Card for CUAD ## Metric description This metric wraps the official scoring script for version 1 of the [Contract Understanding Atticus Dataset (CUAD)](https://huggingface.co/datasets/cuad), which is a corpus of more than 13,000 labels in 510 commercial legal contracts that have been manually labeled to ident...
datasets/metrics/cuad/README.md/0
{ "file_path": "datasets/metrics/cuad/README.md", "repo_id": "datasets", "token_count": 2380 }
68
# Copyright 2022 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/mae/mae.py/0
{ "file_path": "datasets/metrics/mae/mae.py", "repo_id": "datasets", "token_count": 1662 }
69
# Copyright 2022 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/perplexity/perplexity.py/0
{ "file_path": "datasets/metrics/perplexity/perplexity.py", "repo_id": "datasets", "token_count": 3550 }
70
# Copyright 2021 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/spearmanr/spearmanr.py/0
{ "file_path": "datasets/metrics/spearmanr/spearmanr.py", "repo_id": "datasets", "token_count": 1942 }
71
# Metric Card for XNLI ## Metric description The XNLI metric allows to evaluate a model's score on the [XNLI dataset](https://huggingface.co/datasets/xnli), which is a subset of a few thousand examples from the [MNLI dataset](https://huggingface.co/datasets/glue/viewer/mnli) that have been translated into a 14 differ...
datasets/metrics/xnli/README.md/0
{ "file_path": "datasets/metrics/xnli/README.md", "repo_id": "datasets", "token_count": 1226 }
72
#!/usr/bin/env python from argparse import ArgumentParser from datasets.commands.convert import ConvertCommand from datasets.commands.dummy_data import DummyDataCommand from datasets.commands.env import EnvironmentCommand from datasets.commands.run_beam import RunBeamCommand from datasets.commands.test import TestComm...
datasets/src/datasets/commands/datasets_cli.py/0
{ "file_path": "datasets/src/datasets/commands/datasets_cli.py", "repo_id": "datasets", "token_count": 473 }
73
import os from dataclasses import dataclass, field from io import BytesIO from typing import TYPE_CHECKING, Any, ClassVar, Dict, Optional, Union import numpy as np import pyarrow as pa from .. import config from ..download.download_config import DownloadConfig from ..download.streaming_download_manager import xopen, ...
datasets/src/datasets/features/audio.py/0
{ "file_path": "datasets/src/datasets/features/audio.py", "repo_id": "datasets", "token_count": 5335 }
74
# 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/src/datasets/inspect.py/0
{ "file_path": "datasets/src/datasets/inspect.py", "repo_id": "datasets", "token_count": 9937 }
75
# 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/splits.py/0
{ "file_path": "datasets/src/datasets/splits.py", "repo_id": "datasets", "token_count": 9598 }
76
import os from apache_beam.io.filesystems import FileSystems from apache_beam.pipeline import Pipeline from .logging import get_logger CHUNK_SIZE = 2 << 20 # 2mb logger = get_logger(__name__) class BeamPipeline(Pipeline): """Wrapper over `apache_beam.pipeline.Pipeline` for convenience""" def is_local(se...
datasets/src/datasets/utils/beam_utils.py/0
{ "file_path": "datasets/src/datasets/utils/beam_utils.py", "repo_id": "datasets", "token_count": 847 }
77
{ "language": [ "found", "crowdsourced", "expert-generated", "machine-generated", "other" ], "annotations": [ "found", "crowdsourced", "expert-generated", "machine-generated", "no-annotation", "other" ] }
datasets/src/datasets/utils/resources/creators.json/0
{ "file_path": "datasets/src/datasets/utils/resources/creators.json", "repo_id": "datasets", "token_count": 119 }
78
## Add Dummy data test **Important** In order to pass the `load_dataset_<dataset_name>` test, dummy data is required for all possible config names. First we distinguish between datasets scripts that - A) have no config class and - B) have a config class For A) the dummy data folder structure, will always look as fol...
datasets/tests/README.md/0
{ "file_path": "datasets/tests/README.md", "repo_id": "datasets", "token_count": 928 }
79
import os import random import tempfile import unittest import numpy as np import pandas as pd import pyarrow as pa import pytest from absl.testing import parameterized import datasets from datasets.arrow_writer import ArrowWriter from datasets.features import Array2D, Array3D, Array4D, Array5D, Value from datasets.f...
datasets/tests/features/test_array_xd.py/0
{ "file_path": "datasets/tests/features/test_array_xd.py", "repo_id": "datasets", "token_count": 9826 }
80
import pytest from datasets import Dataset, DatasetDict, Features, NamedSplit, Value from datasets.io.text import TextDatasetReader from ..utils import assert_arrow_memory_doesnt_increase, assert_arrow_memory_increases def _check_text_dataset(dataset, expected_features): assert isinstance(dataset, Dataset) ...
datasets/tests/io/test_text.py/0
{ "file_path": "datasets/tests/io/test_text.py", "repo_id": "datasets", "token_count": 1833 }
81
import copy import os from pathlib import Path from typing import List from unittest.mock import patch import fsspec import pytest from fsspec.registry import _registry as _fsspec_registry from fsspec.spec import AbstractFileSystem from datasets.data_files import ( DataFilesDict, DataFilesList, DataFilesP...
datasets/tests/test_data_files.py/0
{ "file_path": "datasets/tests/test_data_files.py", "repo_id": "datasets", "token_count": 12329 }
82
import os from pathlib import Path import pytest from datasets.inspect import ( get_dataset_config_info, get_dataset_config_names, get_dataset_default_config_name, get_dataset_infos, get_dataset_split_names, inspect_dataset, inspect_metric, ) from datasets.packaged_modules.csv import csv ...
datasets/tests/test_inspect.py/0
{ "file_path": "datasets/tests/test_inspect.py", "repo_id": "datasets", "token_count": 2089 }
83
from copy import deepcopy from unittest.case import TestCase import pytest from datasets.arrow_dataset import Dataset from datasets.features import Audio, ClassLabel, Features, Image, Sequence, Value from datasets.info import DatasetInfo from datasets.tasks import ( AudioClassification, AutomaticSpeechRecogni...
datasets/tests/test_tasks.py/0
{ "file_path": "datasets/tests/test_tasks.py", "repo_id": "datasets", "token_count": 4249 }
84
# The “Deep” in Reinforcement Learning [[deep-rl]] <Tip> What we've talked about so far is Reinforcement Learning. But where does the "Deep" come into play? </Tip> Deep Reinforcement Learning introduces **deep neural networks to solve Reinforcement Learning problems** — hence the name “deep”. For instance, in the ne...
deep-rl-class/units/en/unit1/deep-rl.mdx/0
{ "file_path": "deep-rl-class/units/en/unit1/deep-rl.mdx", "repo_id": "deep-rl-class", "token_count": 310 }
85
# Introduction to Q-Learning [[introduction-q-learning]] <img src="https://huggingface.co/datasets/huggingface-deep-rl-course/course-images/resolve/main/en/unit3/thumbnail.jpg" alt="Unit 2 thumbnail" width="100%"> In the first unit of this class, we learned about Reinforcement Learning (RL), the RL process, and the ...
deep-rl-class/units/en/unit2/introduction.mdx/0
{ "file_path": "deep-rl-class/units/en/unit2/introduction.mdx", "repo_id": "deep-rl-class", "token_count": 466 }
86
# Hands-on [[hands-on]] <CourseFloatingBanner classNames="absolute z-10 right-0 top-0" notebooks={[ {label: "Google Colab", value: "https://colab.research.google.com/github/huggingface/deep-rl-class/blob/main/notebooks/unit3/unit3.ipynb"} ]} askForHelpUrl="http://hf.co/join/discor...
deep-rl-class/units/en/unit3/hands-on.mdx/0
{ "file_path": "deep-rl-class/units/en/unit3/hands-on.mdx", "repo_id": "deep-rl-class", "token_count": 5087 }
87
# Hands-on <CourseFloatingBanner classNames="absolute z-10 right-0 top-0" notebooks={[ {label: "Google Colab", value: "https://colab.research.google.com/github/huggingface/deep-rl-class/blob/main/notebooks/unit5/unit5.ipynb"} ]} askForHelpUrl="http://hf.co/join/discord" /> We learned what ML-Agents is and how ...
deep-rl-class/units/en/unit5/hands-on.mdx/0
{ "file_path": "deep-rl-class/units/en/unit5/hands-on.mdx", "repo_id": "deep-rl-class", "token_count": 5146 }
88
# An introduction to Multi-Agents Reinforcement Learning (MARL) ## From single agent to multiple agents In the first unit, we learned to train agents in a single-agent system. When our agent was alone in its environment: **it was not cooperating or collaborating with other agents**. <figure> <img src="https://huggin...
deep-rl-class/units/en/unit7/introduction-to-marl.mdx/0
{ "file_path": "deep-rl-class/units/en/unit7/introduction-to-marl.mdx", "repo_id": "deep-rl-class", "token_count": 982 }
89
# How Huggy works [[how-huggy-works]] Huggy is a Deep Reinforcement Learning environment made by Hugging Face and based on [Puppo the Corgi, a project by the Unity MLAgents team](https://blog.unity.com/technology/puppo-the-corgi-cuteness-overload-with-the-unity-ml-agents-toolkit). This environment was created using th...
deep-rl-class/units/en/unitbonus1/how-huggy-works.mdx/0
{ "file_path": "deep-rl-class/units/en/unitbonus1/how-huggy-works.mdx", "repo_id": "deep-rl-class", "token_count": 1245 }
90
# Offline vs. Online Reinforcement Learning Deep Reinforcement Learning (RL) is a framework **to build decision-making agents**. These agents aim to learn optimal behavior (policy) by interacting with the environment through **trial and error and receiving rewards as unique feedback**. The agent’s goal **is to maximi...
deep-rl-class/units/en/unitbonus3/offline-online.mdx/0
{ "file_path": "deep-rl-class/units/en/unitbonus3/offline-online.mdx", "repo_id": "deep-rl-class", "token_count": 708 }
91
FROM ubuntu:20.04 LABEL maintainer="Hugging Face" LABEL repository="diffusers" ENV DEBIAN_FRONTEND=noninteractive RUN apt update && \ apt install -y bash \ build-essential \ git \ git-lfs \ curl \ ca-certificates \ ...
diffusers/docker/diffusers-onnxruntime-cpu/Dockerfile/0
{ "file_path": "diffusers/docker/diffusers-onnxruntime-cpu/Dockerfile", "repo_id": "diffusers", "token_count": 642 }
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/loaders/lora.md/0
{ "file_path": "diffusers/docs/source/en/api/loaders/lora.md", "repo_id": "diffusers", "token_count": 463 }
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...
diffusers/docs/source/en/api/pipelines/controlnet.md/0
{ "file_path": "diffusers/docs/source/en/api/pipelines/controlnet.md", "repo_id": "diffusers", "token_count": 1146 }
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/overview.md/0
{ "file_path": "diffusers/docs/source/en/api/pipelines/overview.md", "repo_id": "diffusers", "token_count": 1909 }
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/api/pipelines/stable_diffusion/k_diffusion.md/0
{ "file_path": "diffusers/docs/source/en/api/pipelines/stable_diffusion/k_diffusion.md", "repo_id": "diffusers", "token_count": 379 }
96
<!--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/opt_overview.md/0
{ "file_path": "diffusers/docs/source/en/optimization/opt_overview.md", "repo_id": "diffusers", "token_count": 353 }
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/training/lora.md/0
{ "file_path": "diffusers/docs/source/en/training/lora.md", "repo_id": "diffusers", "token_count": 3336 }
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/control_brightness.md/0
{ "file_path": "diffusers/docs/source/en/using-diffusers/control_brightness.md", "repo_id": "diffusers", "token_count": 874 }
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/loading.md/0
{ "file_path": "diffusers/docs/source/en/using-diffusers/loading.md", "repo_id": "diffusers", "token_count": 10373 }
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/en/using-diffusers/text-img2vid.md/0
{ "file_path": "diffusers/docs/source/en/using-diffusers/text-img2vid.md", "repo_id": "diffusers", "token_count": 7527 }
101
# 학습을 위한 데이터셋 만들기 [Hub](https://huggingface.co/datasets?task_categories=task_categories:text-to-image&sort=downloads) 에는 모델 교육을 위한 많은 데이터셋이 있지만, 관심이 있거나 사용하고 싶은 데이터셋을 찾을 수 없는 경우 🤗 [Datasets](hf.co/docs/datasets) 라이브러리를 사용하여 데이터셋을 만들 수 있습니다. 데이터셋 구조는 모델을 학습하려는 작업에 따라 달라집니다. 가장 기본적인 데이터셋 구조는 unconditional 이미지 생성과 같은 작업...
diffusers/docs/source/ko/training/create_dataset.md/0
{ "file_path": "diffusers/docs/source/ko/training/create_dataset.md", "repo_id": "diffusers", "token_count": 3214 }
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/using-diffusers/custom_pipeline_examples.md/0
{ "file_path": "diffusers/docs/source/ko/using-diffusers/custom_pipeline_examples.md", "repo_id": "diffusers", "token_count": 10864 }
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/weighted_prompts.md/0
{ "file_path": "diffusers/docs/source/ko/using-diffusers/weighted_prompts.md", "repo_id": "diffusers", "token_count": 3375 }
104
## Amused training Amused can be finetuned on simple datasets relatively cheaply and quickly. Using 8bit optimizers, lora, and gradient accumulation, amused can be finetuned with as little as 5.5 GB. Here are a set of examples for finetuning amused on some relatively simple datasets. These training recipies are aggres...
diffusers/examples/amused/README.md/0
{ "file_path": "diffusers/examples/amused/README.md", "repo_id": "diffusers", "token_count": 5921 }
105
""" modeled after the textual_inversion.py / train_dreambooth.py and the work of justinpinkney here: https://github.com/justinpinkney/stable-diffusion/blob/main/notebooks/imagic.ipynb """ import inspect import warnings from typing import List, Optional, Union import numpy as np import PIL.Image import torch import to...
diffusers/examples/community/imagic_stable_diffusion.py/0
{ "file_path": "diffusers/examples/community/imagic_stable_diffusion.py", "repo_id": "diffusers", "token_count": 9827 }
106
import inspect from copy import deepcopy from enum import Enum from typing import List, Optional, Tuple, Union import torch from tqdm.auto import tqdm from diffusers.models import AutoencoderKL, UNet2DConditionModel from diffusers.pipelines.pipeline_utils import DiffusionPipeline from diffusers.pipelines.stable_diffu...
diffusers/examples/community/mixture_tiling.py/0
{ "file_path": "diffusers/examples/community/mixture_tiling.py", "repo_id": "diffusers", "token_count": 9146 }
107
# Inspired by: https://github.com/Mikubill/sd-webui-controlnet/discussions/1236 and https://github.com/Mikubill/sd-webui-controlnet/discussions/1280 from typing import Any, Callable, Dict, List, Optional, Tuple, Union import numpy as np import PIL.Image import torch from diffusers import StableDiffusionControlNetPipe...
diffusers/examples/community/stable_diffusion_controlnet_reference.py/0
{ "file_path": "diffusers/examples/community/stable_diffusion_controlnet_reference.py", "repo_id": "diffusers", "token_count": 21091 }
108
# Latent Consistency Distillation Example: [Latent Consistency Models (LCMs)](https://arxiv.org/abs/2310.04378) is a method to distill a latent diffusion model to enable swift inference with minimal steps. This example demonstrates how to use latent consistency distillation to distill stable-diffusion-v1.5 for inferen...
diffusers/examples/consistency_distillation/README.md/0
{ "file_path": "diffusers/examples/consistency_distillation/README.md", "repo_id": "diffusers", "token_count": 1511 }
109
#!/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/controlnet/train_controlnet_flax.py/0
{ "file_path": "diffusers/examples/controlnet/train_controlnet_flax.py", "repo_id": "diffusers", "token_count": 20114 }
110
import argparse import logging import math import os from pathlib import Path import jax import jax.numpy as jnp import numpy as np import optax import torch import torch.utils.checkpoint import transformers from flax import jax_utils from flax.training import train_state from flax.training.common_utils import shard f...
diffusers/examples/dreambooth/train_dreambooth_flax.py/0
{ "file_path": "diffusers/examples/dreambooth/train_dreambooth_flax.py", "repo_id": "diffusers", "token_count": 11966 }
111
# 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/LICENSE-2.0 # # Unless r...
diffusers/examples/kandinsky2_2/text_to_image/train_text_to_image_lora_prior.py/0
{ "file_path": "diffusers/examples/kandinsky2_2/text_to_image/train_text_to_image_lora_prior.py", "repo_id": "diffusers", "token_count": 15623 }
112
# !pip install opencv-python transformers accelerate import argparse import cv2 import numpy as np import torch from controlnetxs import ControlNetXSModel from PIL import Image from pipeline_controlnet_xs import StableDiffusionControlNetXSPipeline from diffusers.utils import load_image parser = argparse.ArgumentPar...
diffusers/examples/research_projects/controlnetxs/infer_sd_controlnetxs.py/0
{ "file_path": "diffusers/examples/research_projects/controlnetxs/infer_sd_controlnetxs.py", "repo_id": "diffusers", "token_count": 646 }
113
# InstructPix2Pix text-to-edit-image fine-tuning This extended LoRA training script was authored by [Aiden-Frost](https://github.com/Aiden-Frost). This is an experimental LoRA extension of [this example](https://github.com/huggingface/diffusers/blob/main/examples/instruct_pix2pix/train_instruct_pix2pix.py). This script...
diffusers/examples/research_projects/instructpix2pix_lora/README.md/0
{ "file_path": "diffusers/examples/research_projects/instructpix2pix_lora/README.md", "repo_id": "diffusers", "token_count": 1124 }
114
import argparse import itertools import json import logging import math import uuid import warnings from os import environ, listdir, makedirs from os.path import basename, join from pathlib import Path from typing import List import datasets import numpy as np import torch import torch.nn.functional as F import torch....
diffusers/examples/research_projects/multi_subject_dreambooth/train_multi_subject_dreambooth.py/0
{ "file_path": "diffusers/examples/research_projects/multi_subject_dreambooth/train_multi_subject_dreambooth.py", "repo_id": "diffusers", "token_count": 21771 }
115
# Show best practices for SDXL JAX import time import jax import jax.numpy as jnp import numpy as np from flax.jax_utils import replicate # Let's cache the model compilation, so that it doesn't take as long the next time around. from jax.experimental.compilation_cache import compilation_cache as cc from diffusers im...
diffusers/examples/research_projects/sdxl_flax/sdxl_single.py/0
{ "file_path": "diffusers/examples/research_projects/sdxl_flax/sdxl_single.py", "repo_id": "diffusers", "token_count": 1341 }
116
#!/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_flax.py/0
{ "file_path": "diffusers/examples/text_to_image/train_text_to_image_flax.py", "repo_id": "diffusers", "token_count": 10030 }
117
import argparse import inspect import logging import math import os import shutil from datetime import timedelta from pathlib import Path import accelerate import datasets import torch import torch.nn.functional as F from accelerate import Accelerator, InitProcessGroupKwargs from accelerate.logging import get_logger f...
diffusers/examples/unconditional_image_generation/train_unconditional.py/0
{ "file_path": "diffusers/examples/unconditional_image_generation/train_unconditional.py", "repo_id": "diffusers", "token_count": 13300 }
118
import math import os import urllib import warnings from argparse import ArgumentParser import torch import torch.nn as nn import torch.nn.functional as F from huggingface_hub.utils import insecure_hashlib from safetensors.torch import load_file as stl from tqdm import tqdm from diffusers import AutoencoderKL, Consis...
diffusers/scripts/convert_consistency_decoder.py/0
{ "file_path": "diffusers/scripts/convert_consistency_decoder.py", "repo_id": "diffusers", "token_count": 21911 }
119
# coding=utf-8 # Copyright 2024, Haofan Wang, Qixun Wang, 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/scripts/convert_lora_safetensor_to_diffusers.py/0
{ "file_path": "diffusers/scripts/convert_lora_safetensor_to_diffusers.py", "repo_id": "diffusers", "token_count": 2130 }
120
import argparse import os import shutil from pathlib import Path import onnx import onnx_graphsurgeon as gs import torch from onnx import shape_inference from packaging import version from polygraphy.backend.onnx.loader import fold_constants from torch.onnx import export from diffusers import ( ControlNetModel, ...
diffusers/scripts/convert_stable_diffusion_controlnet_to_onnx.py/0
{ "file_path": "diffusers/scripts/convert_stable_diffusion_controlnet_to_onnx.py", "repo_id": "diffusers", "token_count": 8995 }
121
# 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/loaders/lora.py/0
{ "file_path": "diffusers/src/diffusers/loaders/lora.py", "repo_id": "diffusers", "token_count": 31234 }
122
from .autoencoder_asym_kl import AsymmetricAutoencoderKL from .autoencoder_kl import AutoencoderKL from .autoencoder_kl_temporal_decoder import AutoencoderKLTemporalDecoder from .autoencoder_tiny import AutoencoderTiny from .consistency_decoder_vae import ConsistencyDecoderVAE
diffusers/src/diffusers/models/autoencoders/__init__.py/0
{ "file_path": "diffusers/src/diffusers/models/autoencoders/__init__.py", "repo_id": "diffusers", "token_count": 99 }
123
from dataclasses import dataclass from ..utils import BaseOutput @dataclass class AutoencoderKLOutput(BaseOutput): """ Output of AutoencoderKL encoding method. Args: latent_dist (`DiagonalGaussianDistribution`): Encoded outputs of `Encoder` represented as the mean and logvar of `Diag...
diffusers/src/diffusers/models/modeling_outputs.py/0
{ "file_path": "diffusers/src/diffusers/models/modeling_outputs.py", "repo_id": "diffusers", "token_count": 178 }
124
# 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_kandinsky3.py/0
{ "file_path": "diffusers/src/diffusers/models/unets/unet_kandinsky3.py", "repo_id": "diffusers", "token_count": 9647 }
125
from typing import TYPE_CHECKING from ...utils import ( DIFFUSERS_SLOW_IMPORT, OptionalDependencyNotAvailable, _LazyModule, get_objects_from_module, is_flax_available, is_torch_available, is_transformers_available, ) _dummy_objects = {} _import_structure = {} try: if not (is_transfor...
diffusers/src/diffusers/pipelines/controlnet/__init__.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/controlnet/__init__.py", "repo_id": "diffusers", "token_count": 1294 }
126
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 = { "timesteps": [ "fast27_timesteps", ...
diffusers/src/diffusers/pipelines/deepfloyd_if/__init__.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/deepfloyd_if/__init__.py", "repo_id": "diffusers", "token_count": 1266 }
127
# Copyright 2022 The Music Spectrogram Diffusion Authors. # 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...
diffusers/src/diffusers/pipelines/deprecated/spectrogram_diffusion/notes_encoder.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/deprecated/spectrogram_diffusion/notes_encoder.py", "repo_id": "diffusers", "token_count": 1254 }
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/deprecated/versatile_diffusion/pipeline_versatile_diffusion_text_to_image.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/deprecated/versatile_diffusion/pipeline_versatile_diffusion_text_to_image.py", "repo_id": "diffusers", "token_count": 9810 }
129
# 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.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/kandinsky2_2/pipeline_kandinsky2_2.py", "repo_id": "diffusers", "token_count": 6269 }
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/latent_diffusion/pipeline_latent_diffusion.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/latent_diffusion/pipeline_latent_diffusion.py", "repo_id": "diffusers", "token_count": 14315 }
131
# coding=utf-8 # Copyright 2024 The HuggingFace Inc. team. # Copyright (c) 2022, NVIDIA CORPORATION. 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.a...
diffusers/src/diffusers/pipelines/pipeline_utils.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/pipeline_utils.py", "repo_id": "diffusers", "token_count": 40780 }
132
from typing import TYPE_CHECKING from ...utils import ( DIFFUSERS_SLOW_IMPORT, OptionalDependencyNotAvailable, _LazyModule, get_objects_from_module, is_flax_available, is_k_diffusion_available, is_k_diffusion_version, is_onnx_available, is_torch_available, is_transformers_availa...
diffusers/src/diffusers/pipelines/stable_diffusion/__init__.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/stable_diffusion/__init__.py", "repo_id": "diffusers", "token_count": 3769 }
133
# Copyright 2024 The InstructPix2Pix 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 ...
diffusers/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_instruct_pix2pix.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_instruct_pix2pix.py", "repo_id": "diffusers", "token_count": 17595 }
134
# 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_k_diffusion/pipeline_stable_diffusion_k_diffusion.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/stable_diffusion_k_diffusion/pipeline_stable_diffusion_k_diffusion.py", "repo_id": "diffusers", "token_count": 14484 }
135
# Copyright 2024 Kakao Brain 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 requi...
diffusers/src/diffusers/pipelines/unclip/pipeline_unclip.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/unclip/pipeline_unclip.py", "repo_id": "diffusers", "token_count": 9940 }
136
# 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 }
137
# Copyright 2024 FLAIR Lab 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/schedulers/scheduling_deis_multistep.py/0
{ "file_path": "diffusers/src/diffusers/schedulers/scheduling_deis_multistep.py", "repo_id": "diffusers", "token_count": 15883 }
138
# Copyright 2024 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_lcm.py/0
{ "file_path": "diffusers/src/diffusers/schedulers/scheduling_lcm.py", "repo_id": "diffusers", "token_count": 13433 }
139
# 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...
diffusers/src/diffusers/utils/__init__.py/0
{ "file_path": "diffusers/src/diffusers/utils/__init__.py", "repo_id": "diffusers", "token_count": 1507 }
140
# This file is autogenerated by the command `make fix-copies`, do not edit. from ..utils import DummyObject, requires_backends class SpectrogramDiffusionPipeline(metaclass=DummyObject): _backends = ["transformers", "torch", "note_seq"] def __init__(self, *args, **kwargs): requires_backends(self, ["tr...
diffusers/src/diffusers/utils/dummy_transformers_and_torch_and_note_seq_objects.py/0
{ "file_path": "diffusers/src/diffusers/utils/dummy_transformers_and_torch_and_note_seq_objects.py", "repo_id": "diffusers", "token_count": 236 }
141
import inspect from diffusers.utils import is_flax_available from diffusers.utils.testing_utils import require_flax if is_flax_available(): import jax @require_flax class FlaxModelTesterMixin: def test_output(self): init_dict, inputs_dict = self.prepare_init_args_and_inputs_for_common() mo...
diffusers/tests/models/test_modeling_common_flax.py/0
{ "file_path": "diffusers/tests/models/test_modeling_common_flax.py", "repo_id": "diffusers", "token_count": 1124 }
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/others/test_config.py/0
{ "file_path": "diffusers/tests/others/test_config.py", "repo_id": "diffusers", "token_count": 4006 }
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/controlnet/test_flax_controlnet.py/0
{ "file_path": "diffusers/tests/pipelines/controlnet/test_flax_controlnet.py", "repo_id": "diffusers", "token_count": 2141 }
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/kandinsky2_2/test_kandinsky_prior.py/0
{ "file_path": "diffusers/tests/pipelines/kandinsky2_2/test_kandinsky_prior.py", "repo_id": "diffusers", "token_count": 4049 }
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/stable_cascade/test_stable_cascade_decoder.py/0
{ "file_path": "diffusers/tests/pipelines/stable_cascade/test_stable_cascade_decoder.py", "repo_id": "diffusers", "token_count": 5590 }
146
# 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_flax.py/0
{ "file_path": "diffusers/tests/pipelines/stable_diffusion_2/test_stable_diffusion_flax.py", "repo_id": "diffusers", "token_count": 1712 }
147
import gc import unittest import torch from transformers import CLIPTextConfig, CLIPTextModel, CLIPTextModelWithProjection, CLIPTokenizer from diffusers import ( AutoencoderKL, DDIMScheduler, DDPMScheduler, PriorTransformer, StableUnCLIPPipeline, UNet2DConditionModel, ) from diffusers.pipeline...
diffusers/tests/pipelines/stable_unclip/test_stable_unclip.py/0
{ "file_path": "diffusers/tests/pipelines/stable_unclip/test_stable_unclip.py", "repo_id": "diffusers", "token_count": 4059 }
148
import tempfile import torch from diffusers import ( DEISMultistepScheduler, DPMSolverMultistepScheduler, DPMSolverSinglestepScheduler, UniPCMultistepScheduler, ) from .test_schedulers import SchedulerCommonTest class DEISMultistepSchedulerTest(SchedulerCommonTest): scheduler_classes = (DEISMul...
diffusers/tests/schedulers/test_scheduler_deis.py/0
{ "file_path": "diffusers/tests/schedulers/test_scheduler_deis.py", "repo_id": "diffusers", "token_count": 5267 }
149
import tempfile import torch from diffusers import PNDMScheduler from .test_schedulers import SchedulerCommonTest class PNDMSchedulerTest(SchedulerCommonTest): scheduler_classes = (PNDMScheduler,) forward_default_kwargs = (("num_inference_steps", 50),) def get_scheduler_config(self, **kwargs): ...
diffusers/tests/schedulers/test_scheduler_pndm.py/0
{ "file_path": "diffusers/tests/schedulers/test_scheduler_pndm.py", "repo_id": "diffusers", "token_count": 4654 }
150
# coding=utf-8 # 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 requir...
diffusers/utils/fetch_latest_release_branch.py/0
{ "file_path": "diffusers/utils/fetch_latest_release_branch.py", "repo_id": "diffusers", "token_count": 824 }
151
<jupyter_start><jupyter_text>Making a Class-Conditioned Diffusion ModelIn this notebook we're going to illustrate one way to add conditioning information to a diffusion model. Specifically, we'll train a class-conditioned diffusion model on MNIST following on from the ['from-scratch' example in Unit 1](https://github.c...
diffusion-models-class/unit2/02_class_conditioned_diffusion_model_example.ipynb/0
{ "file_path": "diffusion-models-class/unit2/02_class_conditioned_diffusion_model_example.ipynb", "repo_id": "diffusion-models-class", "token_count": 3041 }
152
<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 }
153
<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 }
154
<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 }
155
<jupyter_start><jupyter_text>In-painting pipeline for Stable Diffusion using 🧨 Diffusers This notebook shows how to do text-guided in-painting with Stable Diffusion model using 🤗 Hugging Face [🧨 Diffusers library](https://github.com/huggingface/diffusers). For a general introduction to the Stable Diffusion model pl...
notebooks/diffusers/in_painting_with_stable_diffusion_using_diffusers.ipynb/0
{ "file_path": "notebooks/diffusers/in_painting_with_stable_diffusion_using_diffusers.ipynb", "repo_id": "notebooks", "token_count": 1254 }
156
# IDEFICS Demos/examples ## Inference - [Normal inference](inference.py) (needs ~20GB GPU memory) - [4bit quantized inference](inference_4bit.py) (needs ~7GB GPU memory) ## Finetuning The following demos use the Image captioning task: - [PEFT (LORA) finetuning (notebook)](finetune_image_captioning_peft.ipynb) (fits...
notebooks/examples/idefics/README.md/0
{ "file_path": "notebooks/examples/idefics/README.md", "repo_id": "notebooks", "token_count": 148 }
157
<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<jupyter_output><empty_outpu...
notebooks/examples/nucleotide_transformer_dna_sequence_modelling.ipynb/0
{ "file_path": "notebooks/examples/nucleotide_transformer_dna_sequence_modelling.ipynb", "repo_id": "notebooks", "token_count": 6637 }
158
<jupyter_start><jupyter_text>If you're opening this Notebook on colab, you will probably need to install 🤗 Transformers and 🤗 Datasets as well as other dependencies. Uncomment the following cell and run it.<jupyter_code>#! pip install datasets evaluate transformers rouge-score nltk<jupyter_output><empty_output><jupyt...
notebooks/examples/summarization.ipynb/0
{ "file_path": "notebooks/examples/summarization.ipynb", "repo_id": "notebooks", "token_count": 5127 }
159
<jupyter_start><jupyter_text>Fine-tuning for Video Classification with 🤗 TransformersThis notebook shows how to fine-tune a pre-trained Vision model for Video Classification on a custom dataset. The idea is to add a randomly initialized classification head on top of a pre-trained encoder and fine-tune the model altoge...
notebooks/examples/video_classification.ipynb/0
{ "file_path": "notebooks/examples/video_classification.ipynb", "repo_id": "notebooks", "token_count": 8881 }
160
<jupyter_start><jupyter_text>Huggingface Sagemaker-sdk - training with custom metrics Binary Classification with `Trainer` and `imdb` dataset In this demo, we extend the basic classification demo by adding **metrics definition** to capture and visualize training metrics.The documentation of the SageMaker metrics captur...
notebooks/sagemaker/06_sagemaker_metrics/sagemaker-notebook.ipynb/0
{ "file_path": "notebooks/sagemaker/06_sagemaker_metrics/sagemaker-notebook.ipynb", "repo_id": "notebooks", "token_count": 3000 }
161
<jupyter_start><jupyter_text>Going Production: Auto-scale Hugging Face Transformer Endpoints with Amazon SageMaker Welcome to this getting started guide, we will use the new Hugging Face Inference DLCs and Amazon SageMaker Python SDK to deploy a transformer model for real-time inference. In this example we are going to...
notebooks/sagemaker/13_deploy_and_autoscaling_transformers/sagemaker-notebook.ipynb/0
{ "file_path": "notebooks/sagemaker/13_deploy_and_autoscaling_transformers/sagemaker-notebook.ipynb", "repo_id": "notebooks", "token_count": 2793 }
162