text
stringlengths
7
328k
id
stringlengths
14
166
metadata
dict
__index_level_0__
int64
0
459
<!--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/other-formats.md/0
{ "file_path": "diffusers/docs/source/ko/using-diffusers/other-formats.md", "repo_id": "diffusers", "token_count": 6827 }
109
import inspect from typing import List, Optional, Union import numpy as np import PIL.Image import torch from torch import nn from torch.nn import functional as F from torchvision import transforms from transformers import CLIPFeatureExtractor, CLIPModel, CLIPTextModel, CLIPTokenizer from diffusers import ( Autoe...
diffusers/examples/community/clip_guided_stable_diffusion_img2img.py/0
{ "file_path": "diffusers/examples/community/clip_guided_stable_diffusion_img2img.py", "repo_id": "diffusers", "token_count": 9396 }
110
import inspect import re from typing import Any, Callable, Dict, List, Optional, Union import numpy as np import PIL.Image import torch from packaging import version from transformers import CLIPImageProcessor, CLIPTextModel, CLIPTokenizer from diffusers import DiffusionPipeline from diffusers.configuration_utils imp...
diffusers/examples/community/lpw_stable_diffusion.py/0
{ "file_path": "diffusers/examples/community/lpw_stable_diffusion.py", "repo_id": "diffusers", "token_count": 30900 }
111
from typing import Any, Callable, Dict, List, Optional, Union import torch from transformers import CLIPImageProcessor, CLIPTextModel, CLIPTokenizer from diffusers import ( AutoencoderKL, DDIMScheduler, DiffusionPipeline, LMSDiscreteScheduler, PNDMScheduler, StableDiffusionPipeline, UNet2D...
diffusers/examples/community/stable_diffusion_comparison.py/0
{ "file_path": "diffusers/examples/community/stable_diffusion_comparison.py", "repo_id": "diffusers", "token_count": 7381 }
112
import inspect from typing import List, Optional, Union import PIL.Image import torch from torch.nn import functional as F from transformers import ( CLIPImageProcessor, CLIPTextModelWithProjection, CLIPTokenizer, CLIPVisionModelWithProjection, ) from diffusers import ( DiffusionPipeline, Imag...
diffusers/examples/community/unclip_image_interpolation.py/0
{ "file_path": "diffusers/examples/community/unclip_image_interpolation.py", "repo_id": "diffusers", "token_count": 9334 }
113
# 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.py/0
{ "file_path": "diffusers/examples/dreambooth/test_dreambooth.py", "repo_id": "diffusers", "token_count": 4466 }
114
# Kandinsky2.2 text-to-image fine-tuning Kandinsky 2.2 includes a prior pipeline that generates image embeddings from text prompts, and a decoder pipeline that generates the output image based on the image embeddings. We provide `train_text_to_image_prior.py` and `train_text_to_image_decoder.py` scripts to show you ho...
diffusers/examples/kandinsky2_2/text_to_image/README.md/0
{ "file_path": "diffusers/examples/kandinsky2_2/text_to_image/README.md", "repo_id": "diffusers", "token_count": 4394 }
115
#!/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/research_projects/controlnet/train_controlnet_webdataset.py/0
{ "file_path": "diffusers/examples/research_projects/controlnet/train_controlnet_webdataset.py", "repo_id": "diffusers", "token_count": 25995 }
116
# 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 }
117
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": 21727 }
118
# 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 }
119
#!/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 }
120
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 }
121
# 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 }
122
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 }
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/loaders/lora.py/0
{ "file_path": "diffusers/src/diffusers/loaders/lora.py", "repo_id": "diffusers", "token_count": 28666 }
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/autoencoders/autoencoder_asym_kl.py/0
{ "file_path": "diffusers/src/diffusers/models/autoencoders/autoencoder_asym_kl.py", "repo_id": "diffusers", "token_count": 3208 }
125
# 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/models/modeling_pytorch_flax_utils.py/0
{ "file_path": "diffusers/src/diffusers/models/modeling_pytorch_flax_utils.py", "repo_id": "diffusers", "token_count": 3050 }
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/models/unet_1d_blocks.py/0
{ "file_path": "diffusers/src/diffusers/models/unet_1d_blocks.py", "repo_id": "diffusers", "token_count": 3632 }
127
# 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_motion_model.py/0
{ "file_path": "diffusers/src/diffusers/models/unets/unet_motion_model.py", "repo_id": "diffusers", "token_count": 19370 }
128
import os from typing import Any, Callable, Dict, List, Optional, Tuple, Union import torch from torch import nn from ...models.controlnet import ControlNetModel, ControlNetOutput from ...models.modeling_utils import ModelMixin from ...utils import logging logger = logging.get_logger(__name__) class MultiControlN...
diffusers/src/diffusers/pipelines/controlnet/multicontrolnet.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/controlnet/multicontrolnet.py", "repo_id": "diffusers", "token_count": 3924 }
129
from dataclasses import dataclass from typing import List, Optional, Union import numpy as np import PIL.Image from ....utils import ( BaseOutput, ) @dataclass # Copied from diffusers.pipelines.stable_diffusion.pipeline_output.StableDiffusionPipelineOutput with Stable->Alt class AltDiffusionPipelineOutput(BaseO...
diffusers/src/diffusers/pipelines/deprecated/alt_diffusion/pipeline_output.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/deprecated/alt_diffusion/pipeline_output.py", "repo_id": "diffusers", "token_count": 344 }
130
# 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/pipeline_spectrogram_diffusion.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/deprecated/spectrogram_diffusion/pipeline_spectrogram_diffusion.py", "repo_id": "diffusers", "token_count": 4996 }
131
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/deprecated/vq_diffusion/__init__.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/deprecated/vq_diffusion/__init__.py", "repo_id": "diffusers", "token_count": 682 }
132
# 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_combined.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/kandinsky2_2/pipeline_kandinsky2_2_combined.py", "repo_id": "diffusers", "token_count": 18694 }
133
import inspect from typing import List, Optional, Tuple, Union import numpy as np import PIL.Image import torch import torch.utils.checkpoint from ...models import UNet2DModel, VQModel from ...schedulers import ( DDIMScheduler, DPMSolverMultistepScheduler, EulerAncestralDiscreteScheduler, EulerDiscret...
diffusers/src/diffusers/pipelines/latent_diffusion/pipeline_latent_diffusion_superresolution.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/latent_diffusion/pipeline_latent_diffusion_superresolution.py", "repo_id": "diffusers", "token_count": 3451 }
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/pipeline_stable_diffusion_latent_upscale.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_latent_upscale.py", "repo_id": "diffusers", "token_count": 10182 }
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_image_variation.py/0
{ "file_path": "diffusers/src/diffusers/pipelines/unclip/pipeline_unclip_image_variation.py", "repo_id": "diffusers", "token_count": 8369 }
136
# 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/schedulers/__init__.py/0
{ "file_path": "diffusers/src/diffusers/schedulers/__init__.py", "repo_id": "diffusers", "token_count": 4011 }
137
# 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/utils/accelerate_utils.py/0
{ "file_path": "diffusers/src/diffusers/utils/accelerate_utils.py", "repo_id": "diffusers", "token_count": 558 }
138
# 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/dynamic_modules_utils.py/0
{ "file_path": "diffusers/src/diffusers/utils/dynamic_modules_utils.py", "repo_id": "diffusers", "token_count": 7901 }
139
# 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/tests/fixtures/custom_pipeline/pipeline.py/0
{ "file_path": "diffusers/tests/fixtures/custom_pipeline/pipeline.py", "repo_id": "diffusers", "token_count": 1738 }
140
# 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/tests/others/test_dependencies.py/0
{ "file_path": "diffusers/tests/others/test_dependencies.py", "repo_id": "diffusers", "token_count": 775 }
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/audioldm/test_audioldm.py/0
{ "file_path": "diffusers/tests/pipelines/audioldm/test_audioldm.py", "repo_id": "diffusers", "token_count": 7498 }
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/i2vgen_xl/test_i2vgenxl.py/0
{ "file_path": "diffusers/tests/pipelines/i2vgen_xl/test_i2vgenxl.py", "repo_id": "diffusers", "token_count": 4240 }
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/kandinsky2_2/test_kandinsky_prior_emb2emb.py/0
{ "file_path": "diffusers/tests/pipelines/kandinsky2_2/test_kandinsky_prior_emb2emb.py", "repo_id": "diffusers", "token_count": 3478 }
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/paint_by_example/test_paint_by_example.py/0
{ "file_path": "diffusers/tests/pipelines/paint_by_example/test_paint_by_example.py", "repo_id": "diffusers", "token_count": 3653 }
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_prior.py/0
{ "file_path": "diffusers/tests/pipelines/stable_cascade/test_stable_cascade_prior.py", "repo_id": "diffusers", "token_count": 5151 }
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_inpaint.py/0
{ "file_path": "diffusers/tests/pipelines/stable_diffusion_2/test_stable_diffusion_flax_inpaint.py", "repo_id": "diffusers", "token_count": 1259 }
147
# 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_ldm3d/test_stable_diffusion_ldm3d.py/0
{ "file_path": "diffusers/tests/pipelines/stable_diffusion_ldm3d/test_stable_diffusion_ldm3d.py", "repo_id": "diffusers", "token_count": 5569 }
148
import gc import random import unittest import numpy as np import torch from transformers import ( CLIPImageProcessor, CLIPTextConfig, CLIPTextModel, CLIPTokenizer, CLIPVisionConfig, CLIPVisionModelWithProjection, ) from diffusers import AutoencoderKL, DDIMScheduler, DDPMScheduler, StableUnCLI...
diffusers/tests/pipelines/stable_unclip/test_stable_unclip_img2img.py/0
{ "file_path": "diffusers/tests/pipelines/stable_unclip/test_stable_unclip_img2img.py", "repo_id": "diffusers", "token_count": 5046 }
149
# 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/unclip/test_unclip.py/0
{ "file_path": "diffusers/tests/pipelines/unclip/test_unclip.py", "repo_id": "diffusers", "token_count": 7862 }
150
import tempfile import torch from diffusers import ( DEISMultistepScheduler, DPMSolverMultistepScheduler, DPMSolverSinglestepScheduler, UniPCMultistepScheduler, ) from .test_schedulers import SchedulerCommonTest class DPMSolverMultistepSchedulerTest(SchedulerCommonTest): scheduler_classes = (DP...
diffusers/tests/schedulers/test_scheduler_dpm_multi.py/0
{ "file_path": "diffusers/tests/schedulers/test_scheduler_dpm_multi.py", "repo_id": "diffusers", "token_count": 6455 }
151
import torch from diffusers import SASolverScheduler from diffusers.utils.testing_utils import require_torchsde, torch_device from .test_schedulers import SchedulerCommonTest @require_torchsde class SASolverSchedulerTest(SchedulerCommonTest): scheduler_classes = (SASolverScheduler,) forward_default_kwargs =...
diffusers/tests/schedulers/test_scheduler_sasolver.py/0
{ "file_path": "diffusers/tests/schedulers/test_scheduler_sasolver.py", "repo_id": "diffusers", "token_count": 3629 }
152
import json import logging import os from collections import defaultdict from pathlib import Path from huggingface_hub import HfApi, ModelFilter import diffusers PATH_TO_REPO = Path(__file__).parent.parent.resolve() ALWAYS_TEST_PIPELINE_MODULES = [ "controlnet", "stable_diffusion", "stable_diffusion_2",...
diffusers/utils/fetch_torch_cuda_pipeline_test_matrix.py/0
{ "file_path": "diffusers/utils/fetch_torch_cuda_pipeline_test_matrix.py", "repo_id": "diffusers", "token_count": 1082 }
153
# Introduction <CourseFloatingBanner unit={0} classNames="absolute z-10 right-0 top-0" /> ## Welcome to the course on diffusion models ๐Ÿค— ! ## What to expect? In this free course, you will: - ๐Ÿ‘ฉโ€๐ŸŽ“ Study the theory behind diffusion models - ๐Ÿงจ Learn how to generate images and audio with the popular ๐Ÿค— Diffu...
diffusion-models-class/units/en/unit0/1.mdx/0
{ "file_path": "diffusion-models-class/units/en/unit0/1.mdx", "repo_id": "diffusion-models-class", "token_count": 1359 }
154
# Sprint Dreambooth en Keras Cette paget rรฉsume toutes les informations pertinentes requises pour l'รฉvรฉnement. ๐Ÿ“‹. ## Introduction Dreambooth est une technique de *finetuning* permettant d'enseigner de nouveaux concepts visuels ร  des modรจles de diffusion conditionnรฉs par le texte en utilisant seulement 3 ร  5 images....
diffusion-models-class/units/fr/events/3.mdx/0
{ "file_path": "diffusion-models-class/units/fr/events/3.mdx", "repo_id": "diffusion-models-class", "token_count": 4273 }
155
<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 }
156
<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 }
157
<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 }
158
<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 }
159
# 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 }
160
<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 }
161
<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 }
162
<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 }
163
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 }
164
# 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 }
165
# Builds GPU docker image of PyTorch # Uses multi-staged approach to reduce size # Stage 1 # Use base conda image to reduce time FROM continuumio/miniconda3:latest AS compile-image # Specify py version ENV PYTHON_VERSION=3.8 # Install apt libs - copied from https://github.com/huggingface/accelerate/blob/main/docker/acc...
peft/docker/peft-gpu/Dockerfile/0
{ "file_path": "peft/docker/peft-gpu/Dockerfile", "repo_id": "peft", "token_count": 1010 }
166
<!--Copyright 2023 The HuggingFace Team. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed...
peft/docs/source/developer_guides/quantization.md/0
{ "file_path": "peft/docs/source/developer_guides/quantization.md", "repo_id": "peft", "token_count": 2133 }
167
<!--Copyright 2023 The HuggingFace Team. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed...
peft/docs/source/package_reference/p_tuning.md/0
{ "file_path": "peft/docs/source/package_reference/p_tuning.md", "repo_id": "peft", "token_count": 540 }
168
<jupyter_start><jupyter_text>Training PEFT models with new tokens being added to the embedding layers and tokenizerIn this example, we will learn how to train a LoRA model when adding new tokens to the tokenizer and model. This is a common usecase when doing the following:1. Instruction finetuning with new tokens beind...
peft/examples/causal_language_modeling/peft_lora_clm_with_additional_tokens.ipynb/0
{ "file_path": "peft/examples/causal_language_modeling/peft_lora_clm_with_additional_tokens.ipynb", "repo_id": "peft", "token_count": 4571 }
169
# 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/feature_extraction/peft_lora_embedding_semantic_search.py/0
{ "file_path": "peft/examples/feature_extraction/peft_lora_embedding_semantic_search.py", "repo_id": "peft", "token_count": 8634 }
170
# 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 }
171
<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 }
172
accelerate launch --config_file "configs/deepspeed_config.yaml" train.py \ --seed 100 \ --model_name_or_path "meta-llama/Llama-2-70b-hf" \ --dataset_name "smangrul/ultrachat-10k-chatml" \ --chat_template_format "chatml" \ --add_special_tokens False \ --append_concat_token False \ --splits "train,test" \ --max_seq_len ...
peft/examples/sft/run_peft_deepspeed.sh/0
{ "file_path": "peft/examples/sft/run_peft_deepspeed.sh", "repo_id": "peft", "token_count": 454 }
173
# 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/src/peft/tuners/adalora/layer.py/0
{ "file_path": "peft/src/peft/tuners/adalora/layer.py", "repo_id": "peft", "token_count": 6986 }
174
# 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/src/peft/tuners/prefix_tuning/config.py/0
{ "file_path": "peft/src/peft/tuners/prefix_tuning/config.py", "repo_id": "peft", "token_count": 447 }
175
# 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/tests/regression/test_regression.py/0
{ "file_path": "peft/tests/regression/test_regression.py", "repo_id": "peft", "token_count": 9655 }
176
# 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/tests/test_other.py/0
{ "file_path": "peft/tests/test_other.py", "repo_id": "peft", "token_count": 892 }
177
#!/usr/bin/env python3 """ Bulk Model Script Runner Run validation or benchmark script in separate process for each model Benchmark all 'vit*' models: python bulk_runner.py --model-list 'vit*' --results-file vit_bench.csv benchmark.py --amp -b 512 Validate all models: python bulk_runner.py --model-list all --resul...
pytorch-image-models/bulk_runner.py/0
{ "file_path": "pytorch-image-models/bulk_runner.py", "repo_id": "pytorch-image-models", "token_count": 3409 }
178
# Big Transfer (BiT) **Big Transfer (BiT)** is a type of pretraining recipe that pre-trains on a large supervised source dataset, and fine-tunes the weights on the target task. Models are trained on the JFT-300M dataset. The finetuned models contained in this collection are finetuned on ImageNet. {% include 'code_sn...
pytorch-image-models/docs/models/.templates/models/big-transfer.md/0
{ "file_path": "pytorch-image-models/docs/models/.templates/models/big-transfer.md", "repo_id": "pytorch-image-models", "token_count": 3274 }
179
# (Gluon) SENet A **SENet** is a convolutional neural network architecture that employs [squeeze-and-excitation blocks](https://paperswithcode.com/method/squeeze-and-excitation-block) to enable the network to perform dynamic channel-wise feature recalibration. The weights from this model were ported from [Gluon](http...
pytorch-image-models/docs/models/.templates/models/gloun-senet.md/0
{ "file_path": "pytorch-image-models/docs/models/.templates/models/gloun-senet.md", "repo_id": "pytorch-image-models", "token_count": 747 }
180
# Noisy Student (EfficientNet) **Noisy Student Training** is a semi-supervised learning approach. It extends the idea of self-training and distillation with the use of equal-or-larger student models and noise added to the student during learning. It has three main steps: 1. train a teacher model on labeled images 2....
pytorch-image-models/docs/models/.templates/models/noisy-student.md/0
{ "file_path": "pytorch-image-models/docs/models/.templates/models/noisy-student.md", "repo_id": "pytorch-image-models", "token_count": 5862 }
181
# SPNASNet **Single-Path NAS** is a novel differentiable NAS method for designing hardware-efficient ConvNets in less than 4 hours. {% include 'code_snippets.md' %} ## How do I train this model? You can follow the [timm recipe scripts](https://rwightman.github.io/pytorch-image-models/scripts/) for training a new mo...
pytorch-image-models/docs/models/.templates/models/spnasnet.md/0
{ "file_path": "pytorch-image-models/docs/models/.templates/models/spnasnet.md", "repo_id": "pytorch-image-models", "token_count": 699 }
182
dependencies = ['torch'] import timm globals().update(timm.models._registry._model_entrypoints)
pytorch-image-models/hubconf.py/0
{ "file_path": "pytorch-image-models/hubconf.py", "repo_id": "pytorch-image-models", "token_count": 32 }
183
""" Dataset Factory Hacked together by / Copyright 2021, Ross Wightman """ import os from typing import Optional from torchvision.datasets import CIFAR100, CIFAR10, MNIST, KMNIST, FashionMNIST, ImageFolder try: from torchvision.datasets import Places365 has_places365 = True except ImportError: has_places3...
pytorch-image-models/timm/data/dataset_factory.py/0
{ "file_path": "pytorch-image-models/timm/data/dataset_factory.py", "repo_id": "pytorch-image-models", "token_count": 3864 }
184
""" A dataset reader that reads single tarfile based datasets This reader can read datasets consisting if a single tarfile containing images. I am planning to deprecated it in favour of ParerImageInTar. Hacked together by / Copyright 2020 Ross Wightman """ import os import tarfile from timm.utils.misc import natural...
pytorch-image-models/timm/data/readers/reader_image_tar.py/0
{ "file_path": "pytorch-image-models/timm/data/readers/reader_image_tar.py", "repo_id": "pytorch-image-models", "token_count": 1071 }
185
""" Bottleneck Self Attention (Bottleneck Transformers) Paper: `Bottleneck Transformers for Visual Recognition` - https://arxiv.org/abs/2101.11605 @misc{2101.11605, Author = {Aravind Srinivas and Tsung-Yi Lin and Niki Parmar and Jonathon Shlens and Pieter Abbeel and Ashish Vaswani}, Title = {Bottleneck Transformers f...
pytorch-image-models/timm/layers/bottleneck_attn.py/0
{ "file_path": "pytorch-image-models/timm/layers/bottleneck_attn.py", "repo_id": "pytorch-image-models", "token_count": 2907 }
186
""" Filter Response Norm in PyTorch Based on `Filter Response Normalization Layer` - https://arxiv.org/abs/1911.09737 Hacked together by / Copyright 2021 Ross Wightman """ import torch import torch.nn as nn from .create_act import create_act_layer from .trace_utils import _assert def inv_instance_rms(x, eps: float...
pytorch-image-models/timm/layers/filter_response_norm.py/0
{ "file_path": "pytorch-image-models/timm/layers/filter_response_norm.py", "repo_id": "pytorch-image-models", "token_count": 1182 }
187
""" Bilinear-Attention-Transform and Non-Local Attention Paper: `Non-Local Neural Networks With Grouped Bilinear Attentional Transforms` - https://openaccess.thecvf.com/content_CVPR_2020/html/Chi_Non-Local_Neural_Networks_With_Grouped_Bilinear_Attentional_Transforms_CVPR_2020_paper.html Adapted from original code:...
pytorch-image-models/timm/layers/non_local_attn.py/0
{ "file_path": "pytorch-image-models/timm/layers/non_local_attn.py", "repo_id": "pytorch-image-models", "token_count": 3028 }
188
""" Convolution with Weight Standardization (StdConv and ScaledStdConv) StdConv: @article{weightstandardization, author = {Siyuan Qiao and Huiyu Wang and Chenxi Liu and Wei Shen and Alan Yuille}, title = {Weight Standardization}, journal = {arXiv preprint arXiv:1903.10520}, year = {2019}, } Code:...
pytorch-image-models/timm/layers/std_conv.py/0
{ "file_path": "pytorch-image-models/timm/layers/std_conv.py", "repo_id": "pytorch-image-models", "token_count": 2483 }
189
""" PyTorch FX Based Feature Extraction Helpers Using https://pytorch.org/vision/stable/feature_extraction.html """ from typing import Callable, List, Dict, Union, Type import torch from torch import nn from ._features import _get_feature_info, _get_return_layers try: from torchvision.models.feature_extraction i...
pytorch-image-models/timm/models/_features_fx.py/0
{ "file_path": "pytorch-image-models/timm/models/_features_fx.py", "repo_id": "pytorch-image-models", "token_count": 1801 }
190
""" CoaT architecture. Paper: Co-Scale Conv-Attentional Image Transformers - https://arxiv.org/abs/2104.06399 Official CoaT code at: https://github.com/mlpc-ucsd/CoaT Modified from timm/models/vision_transformer.py """ from functools import partial from typing import Tuple, List, Union import torch import torch.nn...
pytorch-image-models/timm/models/coat.py/0
{ "file_path": "pytorch-image-models/timm/models/coat.py", "repo_id": "pytorch-image-models", "token_count": 15685 }
191
""" EfficientViT (by MSRA) Paper: `EfficientViT: Memory Efficient Vision Transformer with Cascaded Group Attention` - https://arxiv.org/abs/2305.07027 Adapted from official impl at https://github.com/microsoft/Cream/tree/main/EfficientViT """ __all__ = ['EfficientVitMsra'] import itertools from collections impor...
pytorch-image-models/timm/models/efficientvit_msra.py/0
{ "file_path": "pytorch-image-models/timm/models/efficientvit_msra.py", "repo_id": "pytorch-image-models", "token_count": 11871 }
192
""" Inception-V3 Originally from torchvision Inception3 model Licensed BSD-Clause 3 https://github.com/pytorch/vision/blob/master/LICENSE """ from functools import partial import torch import torch.nn as nn import torch.nn.functional as F from timm.data import IMAGENET_DEFAULT_STD, IMAGENET_DEFAULT_MEAN, IMAGENET_IN...
pytorch-image-models/timm/models/inception_v3.py/0
{ "file_path": "pytorch-image-models/timm/models/inception_v3.py", "repo_id": "pytorch-image-models", "token_count": 8581 }
193
""" Pyramid Vision Transformer v2 @misc{wang2021pvtv2, title={PVTv2: Improved Baselines with Pyramid Vision Transformer}, author={Wenhai Wang and Enze Xie and Xiang Li and Deng-Ping Fan and Kaitao Song and Ding Liang and Tong Lu and Ping Luo and Ling Shao}, year={2021}, eprint={2106.137...
pytorch-image-models/timm/models/pvt_v2.py/0
{ "file_path": "pytorch-image-models/timm/models/pvt_v2.py", "repo_id": "pytorch-image-models", "token_count": 9047 }
194
""" Swin Transformer V2 A PyTorch impl of : `Swin Transformer V2: Scaling Up Capacity and Resolution` - https://arxiv.org/pdf/2111.09883 Code adapted from https://github.com/ChristophReich1996/Swin-Transformer-V2, original copyright/license info below This implementation is experimental and subject to change in ...
pytorch-image-models/timm/models/swin_transformer_v2_cr.py/0
{ "file_path": "pytorch-image-models/timm/models/swin_transformer_v2_cr.py", "repo_id": "pytorch-image-models", "token_count": 18939 }
195
from .adabelief import AdaBelief from .adafactor import Adafactor from .adahessian import Adahessian from .adamp import AdamP from .adamw import AdamW from .adan import Adan from .lamb import Lamb from .lars import Lars from .lookahead import Lookahead from .madgrad import MADGRAD from .nadam import Nadam from .nvnovog...
pytorch-image-models/timm/optim/__init__.py/0
{ "file_path": "pytorch-image-models/timm/optim/__init__.py", "repo_id": "pytorch-image-models", "token_count": 170 }
196
"""RAdam Optimizer. Implementation lifted from: https://github.com/LiyuanLucasLiu/RAdam Paper: `On the Variance of the Adaptive Learning Rate and Beyond` - https://arxiv.org/abs/1908.03265 """ import math import torch from torch.optim.optimizer import Optimizer class RAdam(Optimizer): def __init__(self, params, ...
pytorch-image-models/timm/optim/radam.py/0
{ "file_path": "pytorch-image-models/timm/optim/radam.py", "repo_id": "pytorch-image-models", "token_count": 1967 }
197
import torch from timm.utils.agc import adaptive_clip_grad def dispatch_clip_grad(parameters, value: float, mode: str = 'norm', norm_type: float = 2.0): """ Dispatch to gradient clipping method Args: parameters (Iterable): model parameters to clip value (float): clipping value/factor/norm, m...
pytorch-image-models/timm/utils/clip_grad.py/0
{ "file_path": "pytorch-image-models/timm/utils/clip_grad.py", "repo_id": "pytorch-image-models", "token_count": 306 }
198
aml target server/transformers server/flash-attention
text-generation-inference/.dockerignore/0
{ "file_path": "text-generation-inference/.dockerignore", "repo_id": "text-generation-inference", "token_count": 16 }
199
install-server: cd server && make install install-custom-kernels: if [ "$$BUILD_EXTENSIONS" = "True" ]; then cd server/custom_kernels && python setup.py install; else echo "Custom kernels are disabled, you need to set the BUILD_EXTENSIONS environment variable to 'True' in order to build them. (Please read the docs, ...
text-generation-inference/Makefile/0
{ "file_path": "text-generation-inference/Makefile", "repo_id": "text-generation-inference", "token_count": 498 }
200
# Serving Private & Gated Models If the model you wish to serve is behind gated access or the model repository on Hugging Face Hub is private, and you have access to the model, you can provide your Hugging Face Hub access token. You can generate and copy a read token from [Hugging Face Hub tokens page](https://hugging...
text-generation-inference/docs/source/basic_tutorials/gated_model_access.md/0
{ "file_path": "text-generation-inference/docs/source/basic_tutorials/gated_model_access.md", "repo_id": "text-generation-inference", "token_count": 320 }
201
# Quick Tour The easiest way of getting started is using the official Docker container. Install Docker following [their installation instructions](https://docs.docker.com/get-docker/). Let's say you want to deploy [teknium/OpenHermes-2.5-Mistral-7B](https://huggingface.co/teknium/OpenHermes-2.5-Mistral-7B) model with...
text-generation-inference/docs/source/quicktour.md/0
{ "file_path": "text-generation-inference/docs/source/quicktour.md", "repo_id": "text-generation-inference", "token_count": 1223 }
202
{ "details": { "best_of_sequences": null, "finish_reason": "length", "generated_tokens": 10, "prefill": [ { "id": 2, "logprob": null, "text": "<bos>" }, { "id": 2015, "logprob": -10.0, "text": "Test" }, { "id": 3853,...
text-generation-inference/integration-tests/models/__snapshots__/test_flash_gemma/test_flash_gemma.json/0
{ "file_path": "text-generation-inference/integration-tests/models/__snapshots__/test_flash_gemma/test_flash_gemma.json", "repo_id": "text-generation-inference", "token_count": 1049 }
203
{ "details": { "best_of_sequences": null, "finish_reason": "length", "generated_tokens": 10, "prefill": [ { "id": 1, "logprob": null, "text": "<s>" }, { "id": 1724, "logprob": -10.734375, "text": "What" }, { "id": 33...
text-generation-inference/integration-tests/models/__snapshots__/test_flash_medusa/test_flash_medusa_simple.json/0
{ "file_path": "text-generation-inference/integration-tests/models/__snapshots__/test_flash_medusa/test_flash_medusa_simple.json", "repo_id": "text-generation-inference", "token_count": 1227 }
204
{ "details": { "best_of_sequences": null, "finish_reason": "length", "generated_tokens": 10, "prefill": [ { "id": 589, "logprob": null, "text": "def" }, { "id": 1459, "logprob": -5.6289062, "text": " print" }, { "id"...
text-generation-inference/integration-tests/models/__snapshots__/test_flash_starcoder/test_flash_starcoder.json/0
{ "file_path": "text-generation-inference/integration-tests/models/__snapshots__/test_flash_starcoder/test_flash_starcoder.json", "repo_id": "text-generation-inference", "token_count": 1111 }
205
[ { "details": { "best_of_sequences": null, "finish_reason": "length", "generated_tokens": 17, "prefill": [ { "id": 1276, "logprob": null, "text": "What" }, { "id": 310, "logprob": -1.5117188, "text": " is"...
text-generation-inference/integration-tests/models/__snapshots__/test_mpt/test_mpt_load.json/0
{ "file_path": "text-generation-inference/integration-tests/models/__snapshots__/test_mpt/test_mpt_load.json", "repo_id": "text-generation-inference", "token_count": 7884 }
206
import pytest @pytest.fixture(scope="module") def bloom_560m_sharded_handle(launcher): with launcher("bigscience/bloom-560m", num_shard=2) as handle: yield handle @pytest.fixture(scope="module") async def bloom_560m_sharded(bloom_560m_sharded_handle): await bloom_560m_sharded_handle.health(240) ...
text-generation-inference/integration-tests/models/test_bloom_560m_sharded.py/0
{ "file_path": "text-generation-inference/integration-tests/models/test_bloom_560m_sharded.py", "repo_id": "text-generation-inference", "token_count": 511 }
207
import pytest @pytest.fixture(scope="module") def flash_starcoder2_handle(launcher): with launcher("bigcode/starcoder2-3b", num_shard=2) as handle: yield handle @pytest.fixture(scope="module") async def flash_starcoder2(flash_starcoder2_handle): await flash_starcoder2_handle.health(300) return f...
text-generation-inference/integration-tests/models/test_flash_starcoder2.py/0
{ "file_path": "text-generation-inference/integration-tests/models/test_flash_starcoder2.py", "repo_id": "text-generation-inference", "token_count": 601 }
208