text stringlengths 7 1.24M | id stringlengths 14 166 | metadata dict | __index_level_0__ int64 0 519 |
|---|---|---|---|
# 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
} | 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/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": 9869
} | 141 |
# 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/kandinsky/pipeline_kandinsky.py/0 | {
"file_path": "diffusers/src/diffusers/pipelines/kandinsky/pipeline_kandinsky.py",
"repo_id": "diffusers",
"token_count": 7937
} | 142 |
#!/usr/bin/env python3
import argparse
import fnmatch
from safetensors.torch import load_file
from diffusers import Kandinsky3UNet
MAPPING = {
"to_time_embed.1": "time_embedding.linear_1",
"to_time_embed.3": "time_embedding.linear_2",
"in_layer": "conv_in",
"out_layer.0": "conv_norm_out",
"out_l... | diffusers/src/diffusers/pipelines/kandinsky3/convert_kandinsky3_unet.py/0 | {
"file_path": "diffusers/src/diffusers/pipelines/kandinsky3/convert_kandinsky3_unet.py",
"repo_id": "diffusers",
"token_count": 1403
} | 143 |
# Copyright 2024 the Latte Team and The HuggingFace Team.
# All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless ... | diffusers/src/diffusers/pipelines/latte/pipeline_latte.py/0 | {
"file_path": "diffusers/src/diffusers/pipelines/latte/pipeline_latte.py",
"repo_id": "diffusers",
"token_count": 18698
} | 144 |
# Copyright 2024 Stability AI 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 requ... | diffusers/src/diffusers/pipelines/stable_audio/modeling_stable_audio.py/0 | {
"file_path": "diffusers/src/diffusers/pipelines/stable_audio/modeling_stable_audio.py",
"repo_id": "diffusers",
"token_count": 2312
} | 145 |
# 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_onnx_stable_diffusion_upscale.py/0 | {
"file_path": "diffusers/src/diffusers/pipelines/stable_diffusion/pipeline_onnx_stable_diffusion_upscale.py",
"repo_id": "diffusers",
"token_count": 12557
} | 146 |
from dataclasses import dataclass
from typing import List, Union
import numpy as np
import PIL.Image
from ...utils import BaseOutput
@dataclass
class StableDiffusion3PipelineOutput(BaseOutput):
"""
Output class for Stable Diffusion pipelines.
Args:
images (`List[PIL.Image.Image]` or `np.ndarray... | diffusers/src/diffusers/pipelines/stable_diffusion_3/pipeline_output.py/0 | {
"file_path": "diffusers/src/diffusers/pipelines/stable_diffusion_3/pipeline_output.py",
"repo_id": "diffusers",
"token_count": 218
} | 147 |
from typing import TYPE_CHECKING
from ...utils import (
DIFFUSERS_SLOW_IMPORT,
BaseOutput,
OptionalDependencyNotAvailable,
_LazyModule,
get_objects_from_module,
is_torch_available,
is_transformers_available,
)
_dummy_objects = {}
_import_structure = {}
try:
if not (is_transformers_av... | diffusers/src/diffusers/pipelines/stable_video_diffusion/__init__.py/0 | {
"file_path": "diffusers/src/diffusers/pipelines/stable_video_diffusion/__init__.py",
"repo_id": "diffusers",
"token_count": 664
} | 148 |
from typing import Optional
import numpy as np
import torch
from torch import nn
from transformers import GPT2Config, GPT2LMHeadModel
from transformers.modeling_utils import ModuleUtilsMixin
from ...configuration_utils import ConfigMixin, register_to_config
from ...models import ModelMixin
# Modified from ClipCapti... | diffusers/src/diffusers/pipelines/unidiffuser/modeling_text_decoder.py/0 | {
"file_path": "diffusers/src/diffusers/pipelines/unidiffuser/modeling_text_decoder.py",
"repo_id": "diffusers",
"token_count": 6303
} | 149 |
# Copyright 2024 Google 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 requ... | diffusers/src/diffusers/schedulers/deprecated/scheduling_sde_vp.py/0 | {
"file_path": "diffusers/src/diffusers/schedulers/deprecated/scheduling_sde_vp.py",
"repo_id": "diffusers",
"token_count": 1693
} | 150 |
# Copyright 2024 TSAIL Team and The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requir... | diffusers/src/diffusers/schedulers/scheduling_dpmsolver_multistep.py/0 | {
"file_path": "diffusers/src/diffusers/schedulers/scheduling_dpmsolver_multistep.py",
"repo_id": "diffusers",
"token_count": 22854
} | 151 |
# Copyright 2024 NVIDIA and The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required b... | diffusers/src/diffusers/schedulers/scheduling_karras_ve_flax.py/0 | {
"file_path": "diffusers/src/diffusers/schedulers/scheduling_karras_ve_flax.py",
"repo_id": "diffusers",
"token_count": 3948
} | 152 |
import contextlib
import copy
import math
import random
from typing import Any, Dict, Iterable, List, Optional, Tuple, Union
import numpy as np
import torch
from .models import UNet2DConditionModel
from .schedulers import SchedulerMixin
from .utils import (
convert_state_dict_to_diffusers,
convert_state_dict_... | diffusers/src/diffusers/training_utils.py/0 | {
"file_path": "diffusers/src/diffusers/training_utils.py",
"repo_id": "diffusers",
"token_count": 10653
} | 153 |
# This file is autogenerated by the command `make fix-copies`, do not edit.
from ..utils import DummyObject, requires_backends
class KolorsImg2ImgPipeline(metaclass=DummyObject):
_backends = ["torch", "transformers", "sentencepiece"]
def __init__(self, *args, **kwargs):
requires_backends(self, ["torc... | diffusers/src/diffusers/utils/dummy_torch_and_transformers_and_sentencepiece_objects.py/0 | {
"file_path": "diffusers/src/diffusers/utils/dummy_torch_and_transformers_and_sentencepiece_objects.py",
"repo_id": "diffusers",
"token_count": 636
} | 154 |
# Copyright 2020 The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... | diffusers/src/diffusers/utils/versions.py/0 | {
"file_path": "diffusers/src/diffusers/utils/versions.py",
"repo_id": "diffusers",
"token_count": 1699
} | 155 |
# coding=utf-8
# Copyright 2024 HuggingFace Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | diffusers/tests/models/autoencoders/test_models_vq.py/0 | {
"file_path": "diffusers/tests/models/autoencoders/test_models_vq.py",
"repo_id": "diffusers",
"token_count": 1581
} | 156 |
# coding=utf-8
# Copyright 2024 HuggingFace Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | diffusers/tests/models/transformers/test_models_transformer_sd3.py/0 | {
"file_path": "diffusers/tests/models/transformers/test_models_transformer_sd3.py",
"repo_id": "diffusers",
"token_count": 1072
} | 157 |
# 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
} | 158 |
import unittest
import numpy as np
import torch
from transformers import CLIPTextConfig, CLIPTextModel, CLIPTextModelWithProjection, CLIPTokenizer
import diffusers
from diffusers import (
AnimateDiffSDXLPipeline,
AutoencoderKL,
DDIMScheduler,
MotionAdapter,
UNet2DConditionModel,
UNetMotionMode... | diffusers/tests/pipelines/animatediff/test_animatediff_sdxl.py/0 | {
"file_path": "diffusers/tests/pipelines/animatediff/test_animatediff_sdxl.py",
"repo_id": "diffusers",
"token_count": 5298
} | 159 |
# 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_controlnet.py/0 | {
"file_path": "diffusers/tests/pipelines/controlnet/test_controlnet.py",
"repo_id": "diffusers",
"token_count": 18979
} | 160 |
# coding=utf-8
# Copyright 2023 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_xs/test_controlnetxs.py/0 | {
"file_path": "diffusers/tests/pipelines/controlnet_xs/test_controlnetxs.py",
"repo_id": "diffusers",
"token_count": 6576
} | 161 |
# 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/dit/test_dit.py/0 | {
"file_path": "diffusers/tests/pipelines/dit/test_dit.py",
"repo_id": "diffusers",
"token_count": 2394
} | 162 |
# 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_combined.py/0 | {
"file_path": "diffusers/tests/pipelines/kandinsky2_2/test_kandinsky_combined.py",
"repo_id": "diffusers",
"token_count": 6108
} | 163 |
import inspect
import unittest
import numpy as np
import torch
from transformers import CLIPTextConfig, CLIPTextModel, CLIPTokenizer
from diffusers import (
AnimateDiffPAGPipeline,
AnimateDiffPipeline,
AutoencoderKL,
DDIMScheduler,
DPMSolverMultistepScheduler,
LCMScheduler,
MotionAdapter,
... | diffusers/tests/pipelines/pag/test_pag_animatediff.py/0 | {
"file_path": "diffusers/tests/pipelines/pag/test_pag_animatediff.py",
"repo_id": "diffusers",
"token_count": 10886
} | 164 |
# These are canonical sets of parameters for different types of pipelines.
# They are set on subclasses of `PipelineTesterMixin` as `params` and
# `batch_params`.
#
# If a pipeline's set of arguments has minor changes from one of the common sets
# of arguments, do not make modifications to the existing common sets of a... | diffusers/tests/pipelines/pipeline_params.py/0 | {
"file_path": "diffusers/tests/pipelines/pipeline_params.py",
"repo_id": "diffusers",
"token_count": 1584
} | 165 |
# 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
} | 166 |
# 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
} | 167 |
# 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_xl/test_stable_diffusion_xl_inpaint.py/0 | {
"file_path": "diffusers/tests/pipelines/stable_diffusion_xl/test_stable_diffusion_xl_inpaint.py",
"repo_id": "diffusers",
"token_count": 15816
} | 168 |
# 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/text_to_video_synthesis/test_text_to_video.py/0 | {
"file_path": "diffusers/tests/pipelines/text_to_video_synthesis/test_text_to_video.py",
"repo_id": "diffusers",
"token_count": 3591
} | 169 |
# 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/single_file/test_model_sd_cascade_unet_single_file.py/0 | {
"file_path": "diffusers/tests/single_file/test_model_sd_cascade_unet_single_file.py",
"repo_id": "diffusers",
"token_count": 1929
} | 170 |
# 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/utils/check_doc_toc.py/0 | {
"file_path": "diffusers/utils/check_doc_toc.py",
"repo_id": "diffusers",
"token_count": 2177
} | 171 |
# Copyright 2024 The HuggingFace Team, the AllenNLP library authors. 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/utils/stale.py/0 | {
"file_path": "diffusers/utils/stale.py",
"repo_id": "diffusers",
"token_count": 996
} | 172 |
#!/usr/bin/env python
# Copyright 2024 The HuggingFace Inc. team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# ... | lerobot/benchmarks/video/run_video_benchmark.py/0 | {
"file_path": "lerobot/benchmarks/video/run_video_benchmark.py",
"repo_id": "lerobot",
"token_count": 8152
} | 173 |
#!/usr/bin/env python
# Copyright 2024 The HuggingFace Inc. team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# ... | lerobot/lerobot/common/datasets/compute_stats.py/0 | {
"file_path": "lerobot/lerobot/common/datasets/compute_stats.py",
"repo_id": "lerobot",
"token_count": 3939
} | 174 |
#!/usr/bin/env python
# Copyright 2024 The HuggingFace Inc. team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# ... | lerobot/lerobot/common/datasets/push_dataset_to_hub/_encode_datasets.py/0 | {
"file_path": "lerobot/lerobot/common/datasets/push_dataset_to_hub/_encode_datasets.py",
"repo_id": "lerobot",
"token_count": 2733
} | 175 |
#!/usr/bin/env python
# Copyright 2024 The HuggingFace Inc. team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# ... | lerobot/lerobot/common/datasets/utils.py/0 | {
"file_path": "lerobot/lerobot/common/datasets/utils.py",
"repo_id": "lerobot",
"token_count": 6829
} | 176 |
#!/usr/bin/env python
# Copyright 2024 Seungjae Lee and Yibin Wang and Haritheja Etukuru
# and H. Jin Kim and Nur Muhammad Mahi Shafiullah and Lerrel Pinto
# and The HuggingFace Inc. team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in com... | lerobot/lerobot/common/policies/vqbet/modeling_vqbet.py/0 | {
"file_path": "lerobot/lerobot/common/policies/vqbet/modeling_vqbet.py",
"repo_id": "lerobot",
"token_count": 21233
} | 177 |
# @package _global_
fps: 30
env:
name: dora
task: DoraAloha-v0
state_dim: 14
action_dim: 14
fps: ${fps}
episode_length: 400
gym:
fps: ${fps}
| lerobot/lerobot/configs/env/dora_aloha_real.yaml/0 | {
"file_path": "lerobot/lerobot/configs/env/dora_aloha_real.yaml",
"repo_id": "lerobot",
"token_count": 74
} | 178 |
#!/usr/bin/env python
# Copyright 2024 The HuggingFace Inc. team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# ... | lerobot/lerobot/scripts/display_sys_info.py/0 | {
"file_path": "lerobot/lerobot/scripts/display_sys_info.py",
"repo_id": "lerobot",
"token_count": 998
} | 179 |
version https://git-lfs.github.com/spec/v1
oid sha256:4ee862b1a6dc1d11df77c36c47ea00db88ad35a48e4d71c2940ad26b55fe2167
size 136
| lerobot/tests/data/lerobot/aloha_mobile_chair/meta_data/episode_data_index.safetensors/0 | {
"file_path": "lerobot/tests/data/lerobot/aloha_mobile_chair/meta_data/episode_data_index.safetensors",
"repo_id": "lerobot",
"token_count": 66
} | 180 |
version https://git-lfs.github.com/spec/v1
oid sha256:921505133c62906bd53034a613a827996994875d84c8b26d69d188df9a7ffeba
size 247
| lerobot/tests/data/lerobot/aloha_mobile_wash_pan/train/state.json/0 | {
"file_path": "lerobot/tests/data/lerobot/aloha_mobile_wash_pan/train/state.json",
"repo_id": "lerobot",
"token_count": 62
} | 181 |
version https://git-lfs.github.com/spec/v1
oid sha256:09de36f2d6786e65e26d4602e00f9097f63a087a6a4f36e98c5367724acfc755
size 2904
| lerobot/tests/data/lerobot/aloha_sim_transfer_cube_human_image/meta_data/stats.safetensors/0 | {
"file_path": "lerobot/tests/data/lerobot/aloha_sim_transfer_cube_human_image/meta_data/stats.safetensors",
"repo_id": "lerobot",
"token_count": 67
} | 182 |
version https://git-lfs.github.com/spec/v1
oid sha256:fda1fe75c9f987c065d4244594e4f6456b7ac6efd7fae2a7952fb48b044dbd30
size 247
| lerobot/tests/data/lerobot/aloha_sim_transfer_cube_scripted_image/train/state.json/0 | {
"file_path": "lerobot/tests/data/lerobot/aloha_sim_transfer_cube_scripted_image/train/state.json",
"repo_id": "lerobot",
"token_count": 67
} | 183 |
version https://git-lfs.github.com/spec/v1
oid sha256:08343c525b04a96a2c21b6929616dac092e2ece9789f9c15830241ae0e1ad020
size 247
| lerobot/tests/data/lerobot/aloha_static_candy/train/state.json/0 | {
"file_path": "lerobot/tests/data/lerobot/aloha_static_candy/train/state.json",
"repo_id": "lerobot",
"token_count": 64
} | 184 |
version https://git-lfs.github.com/spec/v1
oid sha256:0a6e2d2ebfca08420a2aafec744f99939f58ee0cc12a8f4a53bfe71381c9846a
size 247
| lerobot/tests/data/lerobot/aloha_static_tape/train/state.json/0 | {
"file_path": "lerobot/tests/data/lerobot/aloha_static_tape/train/state.json",
"repo_id": "lerobot",
"token_count": 68
} | 185 |
version https://git-lfs.github.com/spec/v1
oid sha256:80da670129e42cb85e93a9f6779c27b081bbaa7e1ecd68577f78877ac3726e70
size 122088
| lerobot/tests/data/lerobot/aloha_static_ziploc_slide/train/data-00000-of-00001.arrow/0 | {
"file_path": "lerobot/tests/data/lerobot/aloha_static_ziploc_slide/train/data-00000-of-00001.arrow",
"repo_id": "lerobot",
"token_count": 67
} | 186 |
version https://git-lfs.github.com/spec/v1
oid sha256:65ceff2650ebbba2ee024be9ec083b7f8f20a69cd2c5bd6624382fe5fb974697
size 3056
| lerobot/tests/data/lerobot/pusht_image/meta_data/stats.safetensors/0 | {
"file_path": "lerobot/tests/data/lerobot/pusht_image/meta_data/stats.safetensors",
"repo_id": "lerobot",
"token_count": 64
} | 187 |
version https://git-lfs.github.com/spec/v1
oid sha256:b6cfcf6051a043dfb16d797fe382ef786b3f818f8ff35a53ecf139f22258d3c3
size 2832
| lerobot/tests/data/lerobot/xarm_lift_medium_replay/meta_data/stats.safetensors/0 | {
"file_path": "lerobot/tests/data/lerobot/xarm_lift_medium_replay/meta_data/stats.safetensors",
"repo_id": "lerobot",
"token_count": 65
} | 188 |
version https://git-lfs.github.com/spec/v1
oid sha256:3ca324435b18abab8956aaac43bdac463e8881f654f7a851a39a7eb190e7e040
size 247
| lerobot/tests/data/lerobot/xarm_push_medium/train/state.json/0 | {
"file_path": "lerobot/tests/data/lerobot/xarm_push_medium/train/state.json",
"repo_id": "lerobot",
"token_count": 63
} | 189 |
version https://git-lfs.github.com/spec/v1
oid sha256:24722873fa5260e960f2c64b1decb02e7bcf31ba44849347e34ea2a268c458e8
size 65
| lerobot/tests/data/lerobot/xarm_push_medium_replay_image/meta_data/info.json/0 | {
"file_path": "lerobot/tests/data/lerobot/xarm_push_medium_replay_image/meta_data/info.json",
"repo_id": "lerobot",
"token_count": 62
} | 190 |
version https://git-lfs.github.com/spec/v1
oid sha256:96431ca3479eef2379406ef901cad7ba5eac4f7edcc48ecc9e8d1fa0e99d8017
size 111338
| lerobot/tests/data/save_dataset_to_safetensors/lerobot/pusht/frame_81.safetensors/0 | {
"file_path": "lerobot/tests/data/save_dataset_to_safetensors/lerobot/pusht/frame_81.safetensors",
"repo_id": "lerobot",
"token_count": 67
} | 191 |
version https://git-lfs.github.com/spec/v1
oid sha256:683a2038185f3d070e7d7c0c31e4aa75067c11bf798daa41c9fab336f4183fda
size 33400
| lerobot/tests/data/save_policy_to_safetensors/aloha_act_1000_steps/param_stats.safetensors/0 | {
"file_path": "lerobot/tests/data/save_policy_to_safetensors/aloha_act_1000_steps/param_stats.safetensors",
"repo_id": "lerobot",
"token_count": 65
} | 192 |
version https://git-lfs.github.com/spec/v1
oid sha256:b7d08c9518f1f15226e4efc6f2a8542d0f3e620c91421c7cacea07d9bd9025d6
size 36312
| lerobot/tests/data/save_policy_to_safetensors/xarm_tdmpcuse_mpc/param_stats.safetensors/0 | {
"file_path": "lerobot/tests/data/save_policy_to_safetensors/xarm_tdmpcuse_mpc/param_stats.safetensors",
"repo_id": "lerobot",
"token_count": 71
} | 193 |
#!/usr/bin/env python
# Copyright 2024 The HuggingFace Inc. team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# ... | lerobot/tests/test_online_buffer.py/0 | {
"file_path": "lerobot/tests/test_online_buffer.py",
"repo_id": "lerobot",
"token_count": 5333
} | 194 |
import torch
from torchaudio.pipelines import SQUIM_OBJECTIVE
import torchaudio
import evaluate
from transformers import (
AutoModel,
AutoProcessor,
pipeline,
WhisperForConditionalGeneration,
WhisperTokenizer,
WhisperTokenizerFast,
)
from accelerate.utils.memory import release_memory
import nump... | parler-tts/training/eval.py/0 | {
"file_path": "parler-tts/training/eval.py",
"repo_id": "parler-tts",
"token_count": 2276
} | 195 |
<!---
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 ... | peft/README.md/0 | {
"file_path": "peft/README.md",
"repo_id": "peft",
"token_count": 3408
} | 196 |
<!--⚠️ Note that this file is in Markdown but contain specific syntax for our doc-builder (similar to MDX) that may not be
rendered properly in your Markdown viewer.
-->
# Soft prompts
Training large pretrained language models is very time-consuming and compute-intensive. As they continue to grow in size, there is in... | peft/docs/source/conceptual_guides/prompting.md/0 | {
"file_path": "peft/docs/source/conceptual_guides/prompting.md",
"repo_id": "peft",
"token_count": 1830
} | 197 |
<jupyter_start><jupyter_code>from datasets import load_dataset
from transformers import set_seed, AutoModelForSeq2SeqLM, AutoTokenizer
from peft import get_peft_model, MultitaskPromptTuningConfig, TaskType, MultitaskPromptTuningInit
set_seed(42)
model_name = "google/flan-t5-base"
peft_config = MultitaskPromptTuningC... | peft/examples/conditional_generation/multitask_prompt_tuning.ipynb/0 | {
"file_path": "peft/examples/conditional_generation/multitask_prompt_tuning.ipynb",
"repo_id": "peft",
"token_count": 3341
} | 198 |
# 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": 8771
} | 199 |
<jupyter_start><jupyter_text>Using PEFT with timm `peft` allows us to train any model with LoRA as long as the layer type is supported. Since `Conv2D` is one of the supported layer types, it makes sense to test it on image models.In this short notebook, we will demonstrate this with an image classification task using [... | peft/examples/image_classification/image_classification_timm_peft_lora.ipynb/0 | {
"file_path": "peft/examples/image_classification/image_classification_timm_peft_lora.ipynb",
"repo_id": "peft",
"token_count": 3067
} | 200 |
import argparse
import gc
import hashlib
import itertools
import logging
import math
import os
import threading
import warnings
from contextlib import nullcontext
from pathlib import Path
import datasets
import diffusers
import numpy as np
import psutil
import torch
import torch.nn.functional as F
import torch.utils.c... | peft/examples/lora_dreambooth/train_dreambooth.py/0 | {
"file_path": "peft/examples/lora_dreambooth/train_dreambooth.py",
"repo_id": "peft",
"token_count": 20030
} | 201 |
<jupyter_start><jupyter_text>Using FourierFT for sequence classification In this example, we fine-tune Roberta (base) on a sequence classification task using FourierFT. Imports<jupyter_code># To run this notebook, please run `pip install evaluate` to install additional dependencies not covered by PEFT.
import torch
f... | peft/examples/sequence_classification/FourierFT.ipynb/0 | {
"file_path": "peft/examples/sequence_classification/FourierFT.ipynb",
"repo_id": "peft",
"token_count": 2571
} | 202 |
python train.py \
--seed 100 \
--model_name_or_path "mistralai/Mistral-7B-v0.1" \
--dataset_name "smangrul/ultrachat-10k-chatml" \
--chat_template_format "chatml" \
--add_special_tokens False \
--append_concat_token False \
--splits "train,test" \
--max_seq_len 2048 \
--num_train_epochs 1 \
--logging_steps 5 \
--log_le... | peft/examples/sft/run_peft.sh/0 | {
"file_path": "peft/examples/sft/run_peft.sh",
"repo_id": "peft",
"token_count": 458
} | 203 |
# flake8: noqa
# There's no way to ignore "F401 '...' imported but unused" warnings in this
# module, but to preserve other warnings. So, don't check this module at all
# coding=utf-8
# Copyright 2023-present the HuggingFace Inc. team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not u... | peft/src/peft/tuners/__init__.py/0 | {
"file_path": "peft/src/peft/tuners/__init__.py",
"repo_id": "peft",
"token_count": 534
} | 204 |
#include <torch/torch.h>
#include <vector>
#include <iostream>
#include <torch/extension.h>
std::vector<at::Tensor> forward_fast_block_diag_cuda(
at::Tensor input);
std::vector<at::Tensor> forward_fast_block_diag(
at::Tensor input
) {
return forward_fast_block_diag_cuda(input);
}
std::vec... | peft/src/peft/tuners/boft/fbd/fbd_cuda.cpp/0 | {
"file_path": "peft/src/peft/tuners/boft/fbd/fbd_cuda.cpp",
"repo_id": "peft",
"token_count": 370
} | 205 |
# 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/ia3/model.py/0 | {
"file_path": "peft/src/peft/tuners/ia3/model.py",
"repo_id": "peft",
"token_count": 9266
} | 206 |
# 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/lora/bnb.py/0 | {
"file_path": "peft/src/peft/tuners/lora/bnb.py",
"repo_id": "peft",
"token_count": 12146
} | 207 |
# 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/oft/config.py/0 | {
"file_path": "peft/src/peft/tuners/oft/config.py",
"repo_id": "peft",
"token_count": 2079
} | 208 |
# 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/prompt_tuning/model.py/0 | {
"file_path": "peft/src/peft/tuners/prompt_tuning/model.py",
"repo_id": "peft",
"token_count": 1486
} | 209 |
# 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/utils/other.py/0 | {
"file_path": "peft/src/peft/utils/other.py",
"repo_id": "peft",
"token_count": 10670
} | 210 |
# Copyright 2024-present the HuggingFace Inc. team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | peft/tests/test_helpers.py/0 | {
"file_path": "peft/tests/test_helpers.py",
"repo_id": "peft",
"token_count": 6577
} | 211 |
# 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/testing_common.py/0 | {
"file_path": "peft/tests/testing_common.py",
"repo_id": "peft",
"token_count": 29970
} | 212 |
import argparse
import hashlib
import os
import mxnet as mx
import gluoncv
import torch
from timm import create_model
parser = argparse.ArgumentParser(description='Convert from MXNet')
parser.add_argument('--model', default='all', type=str, metavar='MODEL',
help='Name of model to train (default: "... | pytorch-image-models/convert/convert_from_mxnet.py/0 | {
"file_path": "pytorch-image-models/convert/convert_from_mxnet.py",
"repo_id": "pytorch-image-models",
"token_count": 1786
} | 213 |
# HRNet
**HRNet**, or **High-Resolution Net**, is a general purpose convolutional neural network for tasks like semantic segmentation, object detection and image classification. It is able to maintain high resolution representations through the whole process. We start from a high-resolution convolution stream, gradual... | pytorch-image-models/hfdocs/source/models/hrnet.mdx/0 | {
"file_path": "pytorch-image-models/hfdocs/source/models/hrnet.mdx",
"repo_id": "pytorch-image-models",
"token_count": 5056
} | 214 |
# RegNetY
**RegNetY** is a convolutional network design space with simple, regular models with parameters: depth \\( d \\), initial width \\( w\_{0} > 0 \\), and slope \\( w\_{a} > 0 \\), and generates a different block width \\( u\_{j} \\) for each block \\( j < d \\). The key restriction for the RegNet types of mode... | pytorch-image-models/hfdocs/source/models/regnety.mdx/0 | {
"file_path": "pytorch-image-models/hfdocs/source/models/regnety.mdx",
"repo_id": "pytorch-image-models",
"token_count": 6770
} | 215 |
# SWSL ResNeXt
A **ResNeXt** repeats a [building block](https://paperswithcode.com/method/resnext-block) that aggregates a set of transformations with the same topology. Compared to a [ResNet](https://paperswithcode.com/method/resnet), it exposes a new dimension, *cardinality* (the size of the set of transformations)... | pytorch-image-models/hfdocs/source/models/swsl-resnext.mdx/0 | {
"file_path": "pytorch-image-models/hfdocs/source/models/swsl-resnext.mdx",
"repo_id": "pytorch-image-models",
"token_count": 3472
} | 216 |
# Scripts
A train, validation, inference, and checkpoint cleaning script included in the github root folder. Scripts are not currently packaged in the pip release.
The training and validation scripts evolved from early versions of the [PyTorch Imagenet Examples](https://github.com/pytorch/examples). I have added sign... | pytorch-image-models/hfdocs/source/training_script.mdx/0 | {
"file_path": "pytorch-image-models/hfdocs/source/training_script.mdx",
"repo_id": "pytorch-image-models",
"token_count": 2320
} | 217 |
""" 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
} | 218 |
""" 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
} | 219 |
""" 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
} | 220 |
""" 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
} | 221 |
from typing import Optional
import torch
from torch import nn
from torch import nn, Tensor
from torch.nn.modules.transformer import _get_activation_fn
def add_ml_decoder_head(model):
if hasattr(model, 'global_pool') and hasattr(model, 'fc'): # most CNN models, like Resnet50
model.global_pool = nn.Identi... | pytorch-image-models/timm/layers/ml_decoder.py/0 | {
"file_path": "pytorch-image-models/timm/layers/ml_decoder.py",
"repo_id": "pytorch-image-models",
"token_count": 3048
} | 222 |
""" Split BatchNorm
A PyTorch BatchNorm layer that splits input batch into N equal parts and passes each through
a separate BN layer. The first split is passed through the parent BN layers with weight/bias
keys the same as the original BN. All other splits pass through BN sub-layers under the '.aux_bn'
namespace.
Thi... | pytorch-image-models/timm/layers/split_batchnorm.py/0 | {
"file_path": "pytorch-image-models/timm/layers/split_batchnorm.py",
"repo_id": "pytorch-image-models",
"token_count": 1394
} | 223 |
import os
from typing import Any, Dict, Optional, Union
from urllib.parse import urlsplit
from timm.layers import set_layer_config
from ._helpers import load_checkpoint
from ._hub import load_model_config_from_hf
from ._pretrained import PretrainedCfg
from ._registry import is_model, model_entrypoint, split_model_name... | pytorch-image-models/timm/models/_factory.py/0 | {
"file_path": "pytorch-image-models/timm/models/_factory.py",
"repo_id": "pytorch-image-models",
"token_count": 1944
} | 224 |
""" Bring-Your-Own-Blocks Network
A flexible network w/ dataclass based config for stacking those NN blocks.
This model is currently used to implement the following networks:
GPU Efficient (ResNets) - gernet_l/m/s (original versions called genet, but this was already used (by SENet author)).
Paper: `Neural Architect... | pytorch-image-models/timm/models/byobnet.py/0 | {
"file_path": "pytorch-image-models/timm/models/byobnet.py",
"repo_id": "pytorch-image-models",
"token_count": 52579
} | 225 |
""" The EfficientNet Family in PyTorch
An implementation of EfficienNet that covers variety of related models with efficient architectures:
* EfficientNet-V2
- `EfficientNetV2: Smaller Models and Faster Training` - https://arxiv.org/abs/2104.00298
* EfficientNet (B0-B8, L2 + Tensorflow pretrained AutoAug/RandAug/A... | pytorch-image-models/timm/models/efficientnet.py/0 | {
"file_path": "pytorch-image-models/timm/models/efficientnet.py",
"repo_id": "pytorch-image-models",
"token_count": 57214
} | 226 |
""" HRNet
Copied from https://github.com/HRNet/HRNet-Image-Classification
Original header:
Copyright (c) Microsoft
Licensed under the MIT License.
Written by Bin Xiao (Bin.Xiao@microsoft.com)
Modified by Ke Sun (sunk@mail.ustc.edu.cn)
"""
import logging
from typing import List
import torch
import torch.nn as... | pytorch-image-models/timm/models/hrnet.py/0 | {
"file_path": "pytorch-image-models/timm/models/hrnet.py",
"repo_id": "pytorch-image-models",
"token_count": 17688
} | 227 |
""" Next-ViT
As described in https://arxiv.org/abs/2207.05501
Next-ViT model defs and weights adapted from https://github.com/bytedance/Next-ViT, original copyright below
"""
# Copyright (c) ByteDance Inc. All rights reserved.
from functools import partial
from typing import Optional
import torch
import torch.nn.fun... | pytorch-image-models/timm/models/nextvit.py/0 | {
"file_path": "pytorch-image-models/timm/models/nextvit.py",
"repo_id": "pytorch-image-models",
"token_count": 12210
} | 228 |
"""
SEResNet implementation from Cadene's pretrained models
https://github.com/Cadene/pretrained-models.pytorch/blob/master/pretrainedmodels/models/senet.py
Additional credit to https://github.com/creafz
Original model: https://github.com/hujie-frank/SENet
ResNet code gently borrowed from
https://github.com/pytorch/v... | pytorch-image-models/timm/models/senet.py/0 | {
"file_path": "pytorch-image-models/timm/models/senet.py",
"repo_id": "pytorch-image-models",
"token_count": 8363
} | 229 |
""" ViTamin
Paper: Designing Scalable Vison Models in the Vision-Language Era
A family of model weights on Huggingface: https://huggingface.co/collections/jienengchen/vitamin-family-661048126b72debdaca060bf
@inproceedings{chen2024vitamin,
title={ViTamin: Designing Scalable Vision Models in the Vision-language Era},... | pytorch-image-models/timm/models/vitamin.py/0 | {
"file_path": "pytorch-image-models/timm/models/vitamin.py",
"repo_id": "pytorch-image-models",
"token_count": 10041
} | 230 |
""" Lookahead Optimizer Wrapper.
Implementation modified from: https://github.com/alphadl/lookahead.pytorch
Paper: `Lookahead Optimizer: k steps forward, 1 step back` - https://arxiv.org/abs/1907.08610
Hacked together by / Copyright 2020 Ross Wightman
"""
from collections import OrderedDict
from typing import Callable... | pytorch-image-models/timm/optim/lookahead.py/0 | {
"file_path": "pytorch-image-models/timm/optim/lookahead.py",
"repo_id": "pytorch-image-models",
"token_count": 1134
} | 231 |
""" Scheduler Factory
Hacked together by / Copyright 2021 Ross Wightman
"""
from typing import List, Optional, Union
from torch.optim import Optimizer
from .cosine_lr import CosineLRScheduler
from .multistep_lr import MultiStepLRScheduler
from .plateau_lr import PlateauLRScheduler
from .poly_lr import PolyLRScheduler... | pytorch-image-models/timm/scheduler/scheduler_factory.py/0 | {
"file_path": "pytorch-image-models/timm/scheduler/scheduler_factory.py",
"repo_id": "pytorch-image-models",
"token_count": 3467
} | 232 |
""" Exponential Moving Average (EMA) of model updates
Hacked together by / Copyright 2020 Ross Wightman
"""
import logging
from collections import OrderedDict
from copy import deepcopy
from typing import Optional
import torch
import torch.nn as nn
_logger = logging.getLogger(__name__)
class ModelEma:
""" Model... | pytorch-image-models/timm/utils/model_ema.py/0 | {
"file_path": "pytorch-image-models/timm/utils/model_ema.py",
"repo_id": "pytorch-image-models",
"token_count": 4614
} | 233 |
[package]
name = "grpc-metadata"
version = "0.1.0"
edition = "2021"
[dependencies]
opentelemetry = "^0.20"
tonic = "^0.10"
tracing = "^0.1"
tracing-opentelemetry = "^0.21"
| text-generation-inference/backends/grpc-metadata/Cargo.toml/0 | {
"file_path": "text-generation-inference/backends/grpc-metadata/Cargo.toml",
"repo_id": "text-generation-inference",
"token_count": 83
} | 234 |
#!/bin/bash
set -ex
TRT_VER="10.2.0.19"
CUDA_VER="12.5"
CUDNN_VER="9.2.1.18-1"
NCCL_VER="2.22.3-1+cuda12.5"
CUBLAS_VER="12.5.3.2-1"
NVRTC_VER="12.5.82-1"
for i in "$@"; do
case $i in
--TRT_VER=?*) TRT_VER="${i#*=}";;
--CUDA_VER=?*) CUDA_VER="${i#*=}";;
--CUDNN_VER=?*) CUDNN_VER="${i#*=}";... | text-generation-inference/backends/trtllm/scripts/install_tensorrt.sh/0 | {
"file_path": "text-generation-inference/backends/trtllm/scripts/install_tensorrt.sh",
"repo_id": "text-generation-inference",
"token_count": 2016
} | 235 |
use clap::{Parser, Subcommand};
use text_generation_router::{server, usage_stats};
use text_generation_router_v3::{connect_backend, V3Error};
use thiserror::Error;
/// App Configuration
#[derive(Parser, Debug)]
#[clap(author, version, about, long_about = None)]
struct Args {
#[command(subcommand)]
command: Opt... | text-generation-inference/backends/v3/src/main.rs/0 | {
"file_path": "text-generation-inference/backends/v3/src/main.rs",
"repo_id": "text-generation-inference",
"token_count": 3129
} | 236 |
[tool.poetry]
name = "text-generation"
version = "0.7.0"
description = "Hugging Face Text Generation Python Client"
license = "Apache-2.0"
authors = ["Olivier Dehaene <olivier@huggingface.co>"]
maintainers = ["Olivier Dehaene <olivier@huggingface.co>"]
readme = "README.md"
homepage = "https://github.com/huggingface/tex... | text-generation-inference/clients/python/pyproject.toml/0 | {
"file_path": "text-generation-inference/clients/python/pyproject.toml",
"repo_id": "text-generation-inference",
"token_count": 334
} | 237 |
# Consuming Text Generation Inference
There are many ways to consume Text Generation Inference (TGI) server in your applications. After launching the server, you can use the [Messages API](https://huggingface.co/docs/text-generation-inference/en/messages_api) `/v1/chat/completions` route and make a `POST` request to g... | text-generation-inference/docs/source/basic_tutorials/consuming_tgi.md/0 | {
"file_path": "text-generation-inference/docs/source/basic_tutorials/consuming_tgi.md",
"repo_id": "text-generation-inference",
"token_count": 2375
} | 238 |
## Speculation
Speculative decoding, assisted generation, Medusa, and others are a few different names for the same idea.
The idea is to generate tokens *before* the large model actually runs, and only *check* if those tokens where valid.
So you are making *more* computations on your LLM, but if you are correct you ... | text-generation-inference/docs/source/conceptual/speculation.md/0 | {
"file_path": "text-generation-inference/docs/source/conceptual/speculation.md",
"repo_id": "text-generation-inference",
"token_count": 712
} | 239 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.