text stringlengths 7 1.24M | id stringlengths 14 166 | metadata dict | __index_level_0__ int64 0 519 |
|---|---|---|---|
# Copyright 2024 Stability AI, The HuggingFace Team and The InstantX Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-... | diffusers/src/diffusers/models/transformers/transformer_sd3.py/0 | {
"file_path": "diffusers/src/diffusers/models/transformers/transformer_sd3.py",
"repo_id": "diffusers",
"token_count": 7033
} | 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/models/unets/unet_stable_cascade.py/0 | {
"file_path": "diffusers/src/diffusers/models/unets/unet_stable_cascade.py",
"repo_id": "diffusers",
"token_count": 14607
} | 138 |
from typing import TYPE_CHECKING
from ...utils import (
DIFFUSERS_SLOW_IMPORT,
OptionalDependencyNotAvailable,
_LazyModule,
get_objects_from_module,
is_flax_available,
is_torch_available,
is_transformers_available,
)
_dummy_objects = {}
_import_structure = {}
try:
if not (is_transfor... | diffusers/src/diffusers/pipelines/controlnet_sd3/__init__.py/0 | {
"file_path": "diffusers/src/diffusers/pipelines/controlnet_sd3/__init__.py",
"repo_id": "diffusers",
"token_count": 741
} | 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/src/diffusers/pipelines/deprecated/audio_diffusion/pipeline_audio_diffusion.py/0 | {
"file_path": "diffusers/src/diffusers/pipelines/deprecated/audio_diffusion/pipeline_audio_diffusion.py",
"repo_id": "diffusers",
"token_count": 6240
} | 140 |
# Attribution-NonCommercial 4.0 International (CC BY-NC 4.0)
# William Peebles and Saining Xie
#
# Copyright (c) 2021 OpenAI
# MIT License
#
# 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 wi... | diffusers/src/diffusers/pipelines/dit/pipeline_dit.py/0 | {
"file_path": "diffusers/src/diffusers/pipelines/dit/pipeline_dit.py",
"repo_id": "diffusers",
"token_count": 4219
} | 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_prior.py/0 | {
"file_path": "diffusers/src/diffusers/pipelines/kandinsky/pipeline_kandinsky_prior.py",
"repo_id": "diffusers",
"token_count": 10612
} | 142 |
# Copyright 2024 Stability AI, Kwai-Kolors Team and The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2... | diffusers/src/diffusers/pipelines/kolors/pipeline_kolors.py/0 | {
"file_path": "diffusers/src/diffusers/pipelines/kolors/pipeline_kolors.py",
"repo_id": "diffusers",
"token_count": 24918
} | 143 |
from dataclasses import dataclass
from typing import List, Optional, Union
import numpy as np
import PIL.Image
from ...utils import BaseOutput
@dataclass
class LEditsPPDiffusionPipelineOutput(BaseOutput):
"""
Output class for LEdits++ Diffusion pipelines.
Args:
images (`List[PIL.Image.Image]` o... | diffusers/src/diffusers/pipelines/ledits_pp/pipeline_output.py/0 | {
"file_path": "diffusers/src/diffusers/pipelines/ledits_pp/pipeline_output.py",
"repo_id": "diffusers",
"token_count": 613
} | 144 |
from typing import TYPE_CHECKING
from ...utils import (
DIFFUSERS_SLOW_IMPORT,
OptionalDependencyNotAvailable,
_LazyModule,
get_objects_from_module,
is_torch_available,
is_transformers_available,
)
_dummy_objects = {}
_import_structure = {}
try:
if not (is_transformers_available() and i... | diffusers/src/diffusers/pipelines/pixart_alpha/__init__.py/0 | {
"file_path": "diffusers/src/diffusers/pipelines/pixart_alpha/__init__.py",
"repo_id": "diffusers",
"token_count": 687
} | 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_cascade/pipeline_stable_cascade_combined.py/0 | {
"file_path": "diffusers/src/diffusers/pipelines/stable_cascade/pipeline_stable_cascade_combined.py",
"repo_id": "diffusers",
"token_count": 7377
} | 146 |
# 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_image_variation.py/0 | {
"file_path": "diffusers/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_image_variation.py",
"repo_id": "diffusers",
"token_count": 9222
} | 147 |
import inspect
import warnings
from typing import Callable, List, Optional, Union
import numpy as np
import torch
from packaging import version
from transformers import CLIPImageProcessor, CLIPTextModel, CLIPTokenizer, CLIPVisionModelWithProjection
from ...configuration_utils import FrozenDict
from ...image_processor... | diffusers/src/diffusers/pipelines/stable_diffusion_safe/pipeline_stable_diffusion_safe.py/0 | {
"file_path": "diffusers/src/diffusers/pipelines/stable_diffusion_safe/pipeline_stable_diffusion_safe.py",
"repo_id": "diffusers",
"token_count": 17431
} | 148 |
# Copyright (c) 2022 Dominic Rampas MIT License
# 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/licen... | diffusers/src/diffusers/pipelines/wuerstchen/modeling_paella_vq_model.py/0 | {
"file_path": "diffusers/src/diffusers/pipelines/wuerstchen/modeling_paella_vq_model.py",
"repo_id": "diffusers",
"token_count": 3040
} | 149 |
# 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_cosine_dpmsolver_multistep.py/0 | {
"file_path": "diffusers/src/diffusers/schedulers/scheduling_cosine_dpmsolver_multistep.py",
"repo_id": "diffusers",
"token_count": 10861
} | 150 |
# Copyright 2024 Zhejiang University Team and The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
#... | diffusers/src/diffusers/schedulers/scheduling_pndm.py/0 | {
"file_path": "diffusers/src/diffusers/schedulers/scheduling_pndm.py",
"repo_id": "diffusers",
"token_count": 9437
} | 151 |
import inspect
import warnings
from typing import Any, Dict, Optional, Union
from packaging import version
def deprecate(*args, take_from: Optional[Union[Dict, Any]] = None, standard_warn=True, stacklevel=2):
from .. import __version__
deprecated_kwargs = take_from
values = ()
if not isinstance(args... | diffusers/src/diffusers/utils/deprecation_utils.py/0 | {
"file_path": "diffusers/src/diffusers/utils/deprecation_utils.py",
"repo_id": "diffusers",
"token_count": 793
} | 152 |
import io
import random
import struct
import tempfile
from contextlib import contextmanager
from typing import List, Union
import numpy as np
import PIL.Image
import PIL.ImageOps
from .import_utils import BACKENDS_MAPPING, is_imageio_available, is_opencv_available
from .logging import get_logger
global_rng = random... | diffusers/src/diffusers/utils/export_utils.py/0 | {
"file_path": "diffusers/src/diffusers/utils/export_utils.py",
"repo_id": "diffusers",
"token_count": 2769
} | 153 |
# 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
} | 154 |
# 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/test_modeling_common.py/0 | {
"file_path": "diffusers/tests/models/test_modeling_common.py",
"repo_id": "diffusers",
"token_count": 20587
} | 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/unets/test_models_unet_2d.py/0 | {
"file_path": "diffusers/tests/models/unets/test_models_unet_2d.py",
"repo_id": "diffusers",
"token_count": 5099
} | 156 |
import pickle as pkl
import unittest
from dataclasses import dataclass
from typing import List, Union
import numpy as np
import PIL.Image
from diffusers.utils.outputs import BaseOutput
from diffusers.utils.testing_utils import require_torch
@dataclass
class CustomOutput(BaseOutput):
images: Union[List[PIL.Image... | diffusers/tests/others/test_outputs.py/0 | {
"file_path": "diffusers/tests/others/test_outputs.py",
"repo_id": "diffusers",
"token_count": 1506
} | 157 |
# 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": 7644
} | 158 |
# coding=utf-8
# Copyright 2024 Harutatsu Akiyama, Jinbin Bai, and HuggingFace Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unle... | diffusers/tests/pipelines/controlnet/test_controlnet_inpaint_sdxl.py/0 | {
"file_path": "diffusers/tests/pipelines/controlnet/test_controlnet_inpaint_sdxl.py",
"repo_id": "diffusers",
"token_count": 5955
} | 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/hunyuan_dit/test_hunyuan_dit.py/0 | {
"file_path": "diffusers/tests/pipelines/hunyuan_dit/test_hunyuan_dit.py",
"repo_id": "diffusers",
"token_count": 5645
} | 160 |
# 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_inpaint.py/0 | {
"file_path": "diffusers/tests/pipelines/kandinsky2_2/test_kandinsky_inpaint.py",
"repo_id": "diffusers",
"token_count": 5553
} | 161 |
# coding=utf-8
# Copyright 2024 Latte Team and HuggingFace Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | diffusers/tests/pipelines/latte/test_latte.py/0 | {
"file_path": "diffusers/tests/pipelines/latte/test_latte.py",
"repo_id": "diffusers",
"token_count": 4735
} | 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/pag/test_pag_hunyuan_dit.py/0 | {
"file_path": "diffusers/tests/pipelines/pag/test_pag_hunyuan_dit.py",
"repo_id": "diffusers",
"token_count": 6402
} | 163 |
# 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/pixart_sigma/test_pixart.py/0 | {
"file_path": "diffusers/tests/pipelines/pixart_sigma/test_pixart.py",
"repo_id": "diffusers",
"token_count": 8085
} | 164 |
# coding=utf-8
# Copyright 2024 HuggingFace Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | diffusers/tests/pipelines/stable_diffusion/test_onnx_stable_diffusion_img2img.py/0 | {
"file_path": "diffusers/tests/pipelines/stable_diffusion/test_onnx_stable_diffusion_img2img.py",
"repo_id": "diffusers",
"token_count": 4266
} | 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_diffusion_2/test_stable_diffusion_upscale.py/0 | {
"file_path": "diffusers/tests/pipelines/stable_diffusion_2/test_stable_diffusion_upscale.py",
"repo_id": "diffusers",
"token_count": 8456
} | 166 |
import gc
import unittest
import torch
from transformers import CLIPTextConfig, CLIPTextModel, CLIPTextModelWithProjection, CLIPTokenizer
from diffusers import (
AutoencoderKL,
DDIMScheduler,
DDPMScheduler,
PriorTransformer,
StableUnCLIPPipeline,
UNet2DConditionModel,
)
from diffusers.pipeline... | diffusers/tests/pipelines/stable_unclip/test_stable_unclip.py/0 | {
"file_path": "diffusers/tests/pipelines/stable_unclip/test_stable_unclip.py",
"repo_id": "diffusers",
"token_count": 4023
} | 167 |
import tempfile
import torch
from diffusers import PNDMScheduler
from .test_schedulers import SchedulerCommonTest
class PNDMSchedulerTest(SchedulerCommonTest):
scheduler_classes = (PNDMScheduler,)
forward_default_kwargs = (("num_inference_steps", 50),)
def get_scheduler_config(self, **kwargs):
... | diffusers/tests/schedulers/test_scheduler_pndm.py/0 | {
"file_path": "diffusers/tests/schedulers/test_scheduler_pndm.py",
"repo_id": "diffusers",
"token_count": 4654
} | 168 |
# 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_table.py/0 | {
"file_path": "diffusers/utils/check_table.py",
"repo_id": "diffusers",
"token_count": 3011
} | 169 |
"""
This script demonstrates the use of `LeRobotDataset` class for handling and processing robotic datasets from Hugging Face.
It illustrates how to load datasets, manipulate them, and apply transformations suitable for machine learning tasks in PyTorch.
Features included in this script:
- Loading a dataset and access... | lerobot/examples/1_load_lerobot_dataset.py/0 | {
"file_path": "lerobot/examples/1_load_lerobot_dataset.py",
"repo_id": "lerobot",
"token_count": 1354
} | 170 |
## Using / Updating `CODEBASE_VERSION` (for maintainers)
Since our dataset pushed to the hub are decoupled with the evolution of this repo, we ensure compatibility of
the datasets with our code, we use a `CODEBASE_VERSION` (defined in
lerobot/common/datasets/lerobot_dataset.py) variable.
For instance, [`lerobot/pusht... | lerobot/lerobot/common/datasets/push_dataset_to_hub/CODEBASE_VERSION.md/0 | {
"file_path": "lerobot/lerobot/common/datasets/push_dataset_to_hub/CODEBASE_VERSION.md",
"repo_id": "lerobot",
"token_count": 1078
} | 171 |
#!/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/dora_parquet_format.py/0 | {
"file_path": "lerobot/lerobot/common/datasets/push_dataset_to_hub/dora_parquet_format.py",
"repo_id": "lerobot",
"token_count": 3602
} | 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/lerobot/common/logger.py/0 | {
"file_path": "lerobot/lerobot/common/logger.py",
"repo_id": "lerobot",
"token_count": 4312
} | 173 |
import enum
import time
import traceback
from copy import deepcopy
from pathlib import Path
import numpy as np
import tqdm
from dynamixel_sdk import (
COMM_SUCCESS,
DXL_HIBYTE,
DXL_HIWORD,
DXL_LOBYTE,
DXL_LOWORD,
GroupSyncRead,
GroupSyncWrite,
PacketHandler,
PortHandler,
)
from ler... | lerobot/lerobot/common/robot_devices/motors/dynamixel.py/0 | {
"file_path": "lerobot/lerobot/common/robot_devices/motors/dynamixel.py",
"repo_id": "lerobot",
"token_count": 14106
} | 174 |
# @package _global_
seed: 1000
dataset_repo_id: lerobot/aloha_sim_insertion_human
override_dataset_stats:
observation.images.top:
# stats from imagenet, since we use a pretrained vision model
mean: [[[0.485]], [[0.456]], [[0.406]]] # (c,1,1)
std: [[[0.229]], [[0.224]], [[0.225]]] # (c,1,1)
training:
... | lerobot/lerobot/configs/policy/act.yaml/0 | {
"file_path": "lerobot/lerobot/configs/policy/act.yaml",
"repo_id": "lerobot",
"token_count": 808
} | 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/scripts/visualize_dataset.py/0 | {
"file_path": "lerobot/lerobot/scripts/visualize_dataset.py",
"repo_id": "lerobot",
"token_count": 3832
} | 176 |
[tool.poetry]
name = "lerobot"
version = "0.1.0"
description = "🤗 LeRobot: State-of-the-art Machine Learning for Real-World Robotics in Pytorch"
authors = [
"Rémi Cadène <re.cadene@gmail.com>",
"Simon Alibert <alibert.sim@gmail.com>",
"Alexander Soare <alexander.soare159@gmail.com>",
"Quentin Gallouéde... | lerobot/pyproject.toml/0 | {
"file_path": "lerobot/pyproject.toml",
"repo_id": "lerobot",
"token_count": 1510
} | 177 |
version https://git-lfs.github.com/spec/v1
oid sha256:de80d5afc044be903a89ee08f30cfef5fb4c1e928d8ba8f4d81ea9d0bb4fb011
size 4344
| lerobot/tests/data/lerobot/aloha_mobile_shrimp/meta_data/stats.safetensors/0 | {
"file_path": "lerobot/tests/data/lerobot/aloha_mobile_shrimp/meta_data/stats.safetensors",
"repo_id": "lerobot",
"token_count": 69
} | 178 |
version https://git-lfs.github.com/spec/v1
oid sha256:1386f9030607facefe56f429c93e50df0e22017914ce3f21ab67edc87b936d9d
size 136
| lerobot/tests/data/lerobot/aloha_mobile_wipe_wine/meta_data/episode_data_index.safetensors/0 | {
"file_path": "lerobot/tests/data/lerobot/aloha_mobile_wipe_wine/meta_data/episode_data_index.safetensors",
"repo_id": "lerobot",
"token_count": 63
} | 179 |
version https://git-lfs.github.com/spec/v1
oid sha256:1bdf02ecf7d5fc502f6dd9f520c636828a5988ad16a69a137780a824f94f8112
size 10782640
| lerobot/tests/data/lerobot/aloha_sim_insertion_scripted_image/train/data-00000-of-00001.arrow/0 | {
"file_path": "lerobot/tests/data/lerobot/aloha_sim_insertion_scripted_image/train/data-00000-of-00001.arrow",
"repo_id": "lerobot",
"token_count": 69
} | 180 |
version https://git-lfs.github.com/spec/v1
oid sha256:76cb2d6220e4febdf2a64b4cb0890941efc08922556b7b56155187684bae2053
size 247
| lerobot/tests/data/lerobot/aloha_static_towel/train/state.json/0 | {
"file_path": "lerobot/tests/data/lerobot/aloha_static_towel/train/state.json",
"repo_id": "lerobot",
"token_count": 63
} | 181 |
version https://git-lfs.github.com/spec/v1
oid sha256:5ed9b1cb9da8fc180def82fe4126a2e4366bd69a807d7631923ea11c16d37139
size 50824
| lerobot/tests/data/lerobot/unitreeh1_two_robot_greeting/train/data-00000-of-00001.arrow/0 | {
"file_path": "lerobot/tests/data/lerobot/unitreeh1_two_robot_greeting/train/data-00000-of-00001.arrow",
"repo_id": "lerobot",
"token_count": 64
} | 182 |
#!/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_sampler.py/0 | {
"file_path": "lerobot/tests/test_sampler.py",
"repo_id": "lerobot",
"token_count": 1409
} | 183 |
# Inference tips
Parler-TTS benefits from a number of optimizations that can make the model up to 4x faster. Add to this the ability to stream audio as it's being generated, and you can achieve time-to-first audio in under 500ms on a modern GPU.
## 📖 Quick Index
* [Efficient Attention Implementation](#efficient-atte... | parler-tts/INFERENCE.md/0 | {
"file_path": "parler-tts/INFERENCE.md",
"repo_id": "parler-tts",
"token_count": 2743
} | 184 |
# coding=utf-8
# Copyright 2024 and The HuggingFace Inc. team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unle... | parler-tts/parler_tts/configuration_parler_tts.py/0 | {
"file_path": "parler-tts/parler_tts/configuration_parler_tts.py",
"repo_id": "parler-tts",
"token_count": 5375
} | 185 |
<!--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/lora.md/0 | {
"file_path": "peft/docs/source/developer_guides/lora.md",
"repo_id": "peft",
"token_count": 6115
} | 186 |
<!--Copyright 2024 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | peft/docs/source/package_reference/vera.md/0 | {
"file_path": "peft/docs/source/package_reference/vera.md",
"repo_id": "peft",
"token_count": 834
} | 187 |
PEFT_TYPE="boft"
BLOCK_NUM=8
BLOCK_SIZE=0
N_BUTTERFLY_FACTOR=1
export DATASET_NAME="oftverse/control-celeba-hq"
export PROJECT_NAME="controlnet_${PEFT_TYPE}"
export RUN_NAME="${PEFT_TYPE}_${BLOCK_NUM}${BLOCK_SIZE}${N_BUTTERFLY_FACTOR}"
export CONTROLNET_PATH=""
export MODEL_NAME="stabilityai/stable-diffusion-2-1"
# e... | peft/examples/boft_controlnet/train_controlnet.sh/0 | {
"file_path": "peft/examples/boft_controlnet/train_controlnet.sh",
"repo_id": "peft",
"token_count": 557
} | 188 |
import argparse
import os
import warnings
from typing import Optional
from huggingface_hub import HfFolder, whoami
from transformers import PretrainedConfig
def import_model_class_from_model_name_or_path(pretrained_model_name_or_path: str, revision: str):
text_encoder_config = PretrainedConfig.from_pretrained(
... | peft/examples/boft_dreambooth/utils/args_loader.py/0 | {
"file_path": "peft/examples/boft_dreambooth/utils/args_loader.py",
"repo_id": "peft",
"token_count": 5745
} | 189 |
<jupyter_start><jupyter_code>from transformers import AutoModelForSeq2SeqLM
from peft import PeftModel, PeftConfig
import torch
from datasets import load_dataset
import os
from transformers import AutoTokenizer
from torch.utils.data import DataLoader
from transformers import default_data_collator, get_linear_schedule_w... | peft/examples/conditional_generation/peft_lora_seq2seq_accelerate_big_model_inference.ipynb/0 | {
"file_path": "peft/examples/conditional_generation/peft_lora_seq2seq_accelerate_big_model_inference.ipynb",
"repo_id": "peft",
"token_count": 1695
} | 190 |
<!--Copyright 2024 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | peft/examples/hra_dreambooth/README.md/0 | {
"file_path": "peft/examples/hra_dreambooth/README.md",
"repo_id": "peft",
"token_count": 1328
} | 191 |
import argparse
import gc
import json
import logging
import math
import os
from dataclasses import dataclass
from datetime import datetime
from pathlib import Path
from random import randint
from typing import Any, Dict, List, Union
# datasets imports
import datasets
# metric imports
import evaluate
import numpy as n... | peft/examples/int8_training/peft_adalora_whisper_large_training.py/0 | {
"file_path": "peft/examples/int8_training/peft_adalora_whisper_large_training.py",
"repo_id": "peft",
"token_count": 13261
} | 192 |
# 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 applicabl... | peft/setup.py/0 | {
"file_path": "peft/setup.py",
"repo_id": "peft",
"token_count": 1584
} | 193 |
# 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/config.py/0 | {
"file_path": "peft/src/peft/tuners/adalora/config.py",
"repo_id": "peft",
"token_count": 1361
} | 194 |
# 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/src/peft/tuners/ln_tuning/model.py/0 | {
"file_path": "peft/src/peft/tuners/ln_tuning/model.py",
"repo_id": "peft",
"token_count": 3180
} | 195 |
# 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/gptq.py/0 | {
"file_path": "peft/src/peft/tuners/lora/gptq.py",
"repo_id": "peft",
"token_count": 1708
} | 196 |
# 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/p_tuning/config.py/0 | {
"file_path": "peft/src/peft/tuners/p_tuning/config.py",
"repo_id": "peft",
"token_count": 732
} | 197 |
# 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/vera/layer.py/0 | {
"file_path": "peft/src/peft/tuners/vera/layer.py",
"repo_id": "peft",
"token_count": 5620
} | 198 |
# 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_loraplus.py/0 | {
"file_path": "peft/tests/test_loraplus.py",
"repo_id": "peft",
"token_count": 1312
} | 199 |
- sections:
- local: index
title: Home
- local: quickstart
title: Quickstart
- local: installation
title: Installation
- local: changes
title: Changelog
title: Get started
- sections:
- local: feature_extraction
title: Using Pretrained Models as Feature Extractors
- local: training_sc... | pytorch-image-models/hfdocs/source/_toctree.yml/0 | {
"file_path": "pytorch-image-models/hfdocs/source/_toctree.yml",
"repo_id": "pytorch-image-models",
"token_count": 1701
} | 200 |
# ECA-ResNet
An **ECA ResNet** is a variant on a [ResNet](https://paperswithcode.com/method/resnet) that utilises an [Efficient Channel Attention module](https://paperswithcode.com/method/efficient-channel-attention). Efficient Channel Attention is an architectural unit based on [squeeze-and-excitation blocks](https:/... | pytorch-image-models/hfdocs/source/models/ecaresnet.mdx/0 | {
"file_path": "pytorch-image-models/hfdocs/source/models/ecaresnet.mdx",
"repo_id": "pytorch-image-models",
"token_count": 3641
} | 201 |
# Inception v4
**Inception-v4** is a convolutional neural network architecture that builds on previous iterations of the Inception family by simplifying the architecture and using more inception modules than [Inception-v3](https://paperswithcode.com/method/inception-v3).
## How do I use this model on an image?
To loa... | pytorch-image-models/hfdocs/source/models/inception-v4.mdx/0 | {
"file_path": "pytorch-image-models/hfdocs/source/models/inception-v4.mdx",
"repo_id": "pytorch-image-models",
"token_count": 1625
} | 202 |
# ResNet-D
**ResNet-D** is a modification on the [ResNet](https://paperswithcode.com/method/resnet) architecture that utilises an [average pooling](https://paperswithcode.com/method/average-pooling) tweak for downsampling. The motivation is that in the unmodified ResNet, the [1×1 convolution](https://paperswithcode.co... | pytorch-image-models/hfdocs/source/models/resnet-d.mdx/0 | {
"file_path": "pytorch-image-models/hfdocs/source/models/resnet-d.mdx",
"repo_id": "pytorch-image-models",
"token_count": 3932
} | 203 |
""" ONNX-runtime validation script
This script was created to verify accuracy and performance of exported ONNX
models running with the onnxruntime. It utilizes the PyTorch dataloader/processing
pipeline for a fair comparison against the originals.
Copyright 2020 Ross Wightman
"""
import argparse
import numpy as np
im... | pytorch-image-models/onnx_validate.py/0 | {
"file_path": "pytorch-image-models/onnx_validate.py",
"repo_id": "pytorch-image-models",
"token_count": 1960
} | 204 |
"""Run tests for all models
Tests that run on CI should have a specific marker, e.g. @pytest.mark.base. This
marker is used to parallelize the CI runs, with one runner for each marker.
If new tests are added, ensure that they use one of the existing markers
(documented in pyproject.toml > pytest > markers) or that a ... | pytorch-image-models/tests/test_models.py/0 | {
"file_path": "pytorch-image-models/tests/test_models.py",
"repo_id": "pytorch-image-models",
"token_count": 11625
} | 205 |
""" Loader Factory, Fast Collate, CUDA Prefetcher
Prefetcher and Fast Collate inspired by NVIDIA APEX example at
https://github.com/NVIDIA/apex/commit/d5e2bb4bdeedd27b1dfaf5bb2b24d6c000dee9be#diff-cf86c282ff7fba81fad27a559379d5bf
Hacked together by / Copyright 2019, Ross Wightman
"""
import logging
import random
from... | pytorch-image-models/timm/data/loader.py/0 | {
"file_path": "pytorch-image-models/timm/data/loader.py",
"repo_id": "pytorch-image-models",
"token_count": 6793
} | 206 |
""" Real labels evaluator for ImageNet
Paper: `Are we done with ImageNet?` - https://arxiv.org/abs/2006.07159
Based on Numpy example at https://github.com/google-research/reassessed-imagenet
Hacked together by / Copyright 2020 Ross Wightman
"""
import os
import json
import numpy as np
import pkgutil
class RealLabels... | pytorch-image-models/timm/data/real_labels.py/0 | {
"file_path": "pytorch-image-models/timm/data/real_labels.py",
"repo_id": "pytorch-image-models",
"token_count": 854
} | 207 |
""" Model / Layer Config singleton state
"""
import os
import warnings
from typing import Any, Optional
import torch
__all__ = [
'is_exportable', 'is_scriptable', 'is_no_jit', 'use_fused_attn',
'set_exportable', 'set_scriptable', 'set_no_jit', 'set_layer_config', 'set_fused_attn'
]
# Set to True if prefer to... | pytorch-image-models/timm/layers/config.py/0 | {
"file_path": "pytorch-image-models/timm/layers/config.py",
"repo_id": "pytorch-image-models",
"token_count": 1787
} | 208 |
from typing import Tuple
import torch
def ndgrid(*tensors) -> Tuple[torch.Tensor, ...]:
"""generate N-D grid in dimension order.
The ndgrid function is like meshgrid except that the order of the first two input arguments are switched.
That is, the statement
[X1,X2,X3] = ndgrid(x1,x2,x3)
produc... | pytorch-image-models/timm/layers/grid.py/0 | {
"file_path": "pytorch-image-models/timm/layers/grid.py",
"repo_id": "pytorch-image-models",
"token_count": 565
} | 209 |
""" Normalization + Activation Layers
Provides Norm+Act fns for standard PyTorch norm layers such as
* BatchNorm
* GroupNorm
* LayerNorm
This allows swapping with alternative layers that are natively both norm + act such as
* EvoNorm (evo_norm.py)
* FilterResponseNorm (filter_response_norm.py)
* InplaceABN (inplace_a... | pytorch-image-models/timm/layers/norm_act.py/0 | {
"file_path": "pytorch-image-models/timm/layers/norm_act.py",
"repo_id": "pytorch-image-models",
"token_count": 7973
} | 210 |
try:
from torch import _assert
except ImportError:
def _assert(condition: bool, message: str):
assert condition, message
def _float_to_int(x: float) -> int:
"""
Symbolic tracing helper to substitute for inbuilt `int`.
Hint: Inbuilt `int` can't accept an argument of type `Proxy`
"""
... | pytorch-image-models/timm/layers/trace_utils.py/0 | {
"file_path": "pytorch-image-models/timm/layers/trace_utils.py",
"repo_id": "pytorch-image-models",
"token_count": 119
} | 211 |
import hashlib
import json
import logging
import os
from functools import partial
from pathlib import Path
from tempfile import TemporaryDirectory
from typing import Iterable, Optional, Union
import torch
from torch.hub import HASH_REGEX, download_url_to_file, urlparse
try:
from torch.hub import get_dir
except Im... | pytorch-image-models/timm/models/_hub.py/0 | {
"file_path": "pytorch-image-models/timm/models/_hub.py",
"repo_id": "pytorch-image-models",
"token_count": 6957
} | 212 |
""" ConvMixer
"""
from typing import Optional
import torch
import torch.nn as nn
from timm.data import IMAGENET_DEFAULT_MEAN, IMAGENET_DEFAULT_STD
from timm.layers import SelectAdaptivePool2d
from ._registry import register_model, generate_default_cfgs
from ._builder import build_model_with_cfg
from ._manipulate imp... | pytorch-image-models/timm/models/convmixer.py/0 | {
"file_path": "pytorch-image-models/timm/models/convmixer.py",
"repo_id": "pytorch-image-models",
"token_count": 2255
} | 213 |
from ._factory import *
import warnings
warnings.warn(f"Importing from {__name__} is deprecated, please import via timm.models", DeprecationWarning)
| pytorch-image-models/timm/models/factory.py/0 | {
"file_path": "pytorch-image-models/timm/models/factory.py",
"repo_id": "pytorch-image-models",
"token_count": 43
} | 214 |
""" Inception-V3
Originally from torchvision Inception3 model
Licensed BSD-Clause 3 https://github.com/pytorch/vision/blob/master/LICENSE
"""
from functools import partial
from typing import Optional
import torch
import torch.nn as nn
import torch.nn.functional as F
from timm.data import IMAGENET_DEFAULT_STD, IMAGEN... | 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": 8642
} | 215 |
""" 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": 9064
} | 216 |
""" Swin Transformer V2
A PyTorch impl of : `Swin Transformer V2: Scaling Up Capacity and Resolution`
- https://arxiv.org/abs/2111.09883
Code/weights from https://github.com/microsoft/Swin-Transformer, original copyright/license info below
Modifications and additions for timm hacked together by / Copyright 2022, ... | pytorch-image-models/timm/models/swin_transformer_v2.py/0 | {
"file_path": "pytorch-image-models/timm/models/swin_transformer_v2.py",
"repo_id": "pytorch-image-models",
"token_count": 21255
} | 217 |
"""Pytorch impl of Aligned Xception 41, 65, 71
This is a correct, from scratch impl of Aligned Xception (Deeplab) models compatible with TF weights at
https://github.com/tensorflow/models/blob/master/research/deeplab/g3doc/model_zoo.md
Hacked together by / Copyright 2020 Ross Wightman
"""
from functools import partia... | pytorch-image-models/timm/models/xception_aligned.py/0 | {
"file_path": "pytorch-image-models/timm/models/xception_aligned.py",
"repo_id": "pytorch-image-models",
"token_count": 7763
} | 218 |
""" Nvidia NovoGrad Optimizer.
Original impl by Nvidia from Jasper example:
- https://github.com/NVIDIA/DeepLearningExamples/blob/master/PyTorch/SpeechRecognition/Jasper
Paper: `Stochastic Gradient Methods with Layer-wise Adaptive Moments for Training of Deep Networks`
- https://arxiv.org/abs/1905.11286
"""
im... | pytorch-image-models/timm/optim/nvnovograd.py/0 | {
"file_path": "pytorch-image-models/timm/optim/nvnovograd.py",
"repo_id": "pytorch-image-models",
"token_count": 2415
} | 219 |
""" Adaptive Gradient Clipping
An impl of AGC, as per (https://arxiv.org/abs/2102.06171):
@article{brock2021high,
author={Andrew Brock and Soham De and Samuel L. Smith and Karen Simonyan},
title={High-Performance Large-Scale Image Recognition Without Normalization},
journal={arXiv preprint arXiv:},
year={2021... | pytorch-image-models/timm/utils/agc.py/0 | {
"file_path": "pytorch-image-models/timm/utils/agc.py",
"repo_id": "pytorch-image-models",
"token_count": 661
} | 220 |
__version__ = '1.0.9'
| pytorch-image-models/timm/version.py/0 | {
"file_path": "pytorch-image-models/timm/version.py",
"repo_id": "pytorch-image-models",
"token_count": 12
} | 221 |
ARG CUDA_ARCH_LIST="75-real;80-real;86-real;89-real;90-real"
ARG OMPI_VERSION="4.1.6"
# Build dependencies resolver stage
FROM lukemathwalker/cargo-chef:latest AS chef
WORKDIR /usr/src/text-generation-inference/backends/trtllm
FROM chef AS planner
COPY . .
RUN cargo chef prepare --recipe-path recipe.json
# CUDA depe... | text-generation-inference/backends/trtllm/Dockerfile/0 | {
"file_path": "text-generation-inference/backends/trtllm/Dockerfile",
"repo_id": "text-generation-inference",
"token_count": 1463
} | 222 |
pub use backend::{GenerationContext, TensorRtLlmBackend};
mod backend;
pub mod errors;
#[cxx::bridge(namespace = "huggingface::tgi::backends")]
mod ffi {
/// Struct used as shared type between rust and C++ to represent the result
/// of a single decoding iteration
pub struct GenerationStep {
toke... | text-generation-inference/backends/trtllm/src/lib.rs/0 | {
"file_path": "text-generation-inference/backends/trtllm/src/lib.rs",
"repo_id": "text-generation-inference",
"token_count": 1091
} | 223 |
<div align="center">
# Text Generation Inference benchmarking tool

</div>
A lightweight benchmarking tool based inspired by [oha](https://github.com/hatoo/oha)
and powered by [tui](https://github.com/tui-rs-revival/ratatui).
## Install
```shell
make install-benchmark
```
## ... | text-generation-inference/benchmark/README.md/0 | {
"file_path": "text-generation-inference/benchmark/README.md",
"repo_id": "text-generation-inference",
"token_count": 187
} | 224 |
import pytest
from text_generation import (
InferenceAPIClient,
InferenceAPIAsyncClient,
Client,
AsyncClient,
)
from text_generation.errors import NotSupportedError, NotFoundError
from text_generation.inference_api import check_model_support, deployed_models
def test_check_model_support(flan_t5_xxl, ... | text-generation-inference/clients/python/tests/test_inference_api.py/0 | {
"file_path": "text-generation-inference/clients/python/tests/test_inference_api.py",
"repo_id": "text-generation-inference",
"token_count": 411
} | 225 |
# Installation from source
<Tip warning={true}>
Installing TGI from source is not the recommended usage. We strongly recommend to use TGI through Docker, check the [Quick Tour](./quicktour), [Installation for Nvidia GPUs](./installation_nvidia) and [Installation for AMD GPUs](./installation_amd) to learn how to use T... | text-generation-inference/docs/source/installation.md/0 | {
"file_path": "text-generation-inference/docs/source/installation.md",
"repo_id": "text-generation-inference",
"token_count": 727
} | 226 |
{
"details": {
"best_of_sequences": null,
"finish_reason": "eos_token",
"generated_tokens": 4,
"prefill": [
{
"id": 100000,
"logprob": null,
"text": "<|begin▁of▁sentence|>"
},
{
"id": 3533,
"logprob": -9.625,
"text": "Test"
},
... | text-generation-inference/integration-tests/models/__snapshots__/test_flash_deepseek_v2/test_flash_deepseek_v2_all_params.json/0 | {
"file_path": "text-generation-inference/integration-tests/models/__snapshots__/test_flash_deepseek_v2/test_flash_deepseek_v2_all_params.json",
"repo_id": "text-generation-inference",
"token_count": 618
} | 227 |
{
"details": {
"best_of_sequences": null,
"finish_reason": "eos_token",
"generated_tokens": 30,
"prefill": [
{
"id": 1,
"logprob": null,
"text": "<s>"
},
{
"id": 5235,
"logprob": -10.0625,
"text": "info"
},
{
"id": 2... | text-generation-inference/integration-tests/models/__snapshots__/test_flash_grammar_llama/test_flash_llama_grammar_json.json/0 | {
"file_path": "text-generation-inference/integration-tests/models/__snapshots__/test_flash_grammar_llama/test_flash_llama_grammar_json.json",
"repo_id": "text-generation-inference",
"token_count": 3397
} | 228 |
{
"details": {
"best_of_sequences": null,
"finish_reason": "eos_token",
"generated_tokens": 2,
"prefill": [],
"seed": null,
"tokens": [
{
"id": 54901,
"logprob": -0.84765625,
"special": false,
"text": "beach"
},
{
"id": 1,
"logp... | text-generation-inference/integration-tests/models/__snapshots__/test_flash_pali_gemma/test_flash_pali_gemma.json/0 | {
"file_path": "text-generation-inference/integration-tests/models/__snapshots__/test_flash_pali_gemma/test_flash_pali_gemma.json",
"repo_id": "text-generation-inference",
"token_count": 266
} | 229 |
{
"details": {
"best_of_sequences": null,
"finish_reason": "eos_token",
"generated_tokens": 2,
"prefill": [
{
"id": 589,
"logprob": null,
"text": "def"
},
{
"id": 3226,
"logprob": -8.9453125,
"text": " ge"
},
{
"id":... | text-generation-inference/integration-tests/models/__snapshots__/test_flash_starcoder_gptq/test_flash_starcoder_gptq.json/0 | {
"file_path": "text-generation-inference/integration-tests/models/__snapshots__/test_flash_starcoder_gptq/test_flash_starcoder_gptq.json",
"repo_id": "text-generation-inference",
"token_count": 994
} | 230 |
{
"details": {
"finish_reason": "eos_token",
"generated_tokens": 7,
"prefill": [],
"seed": null,
"tokens": [
{
"id": 1,
"logprob": -0.49658203,
"special": true,
"text": "<s>"
},
{
"id": 28705,
"logprob": -0.0016384125,
"spec... | text-generation-inference/integration-tests/models/__snapshots__/test_lora_mistral/test_lora_mistral_with_dbpedia_adapter.json/0 | {
"file_path": "text-generation-inference/integration-tests/models/__snapshots__/test_lora_mistral/test_lora_mistral_with_dbpedia_adapter.json",
"repo_id": "text-generation-inference",
"token_count": 611
} | 231 |
{
"details": {
"best_of_sequences": null,
"finish_reason": "length",
"generated_tokens": 10,
"prefill": [
{
"id": 1,
"logprob": null,
"text": "<s>"
},
{
"id": 4321,
"logprob": -9.7890625,
"text": "Test"
},
{
"id": 20... | text-generation-inference/integration-tests/models/__snapshots__/test_server_gptq_quantized/test_server_gptq_quantized_all_params.json/0 | {
"file_path": "text-generation-inference/integration-tests/models/__snapshots__/test_server_gptq_quantized/test_server_gptq_quantized_all_params.json",
"repo_id": "text-generation-inference",
"token_count": 1034
} | 232 |
import pytest
@pytest.fixture(scope="module")
def flash_falcon_handle(launcher):
with launcher("tiiuae/falcon-7b", trust_remote_code=True) as handle:
yield handle
@pytest.fixture(scope="module")
async def flash_falcon(flash_falcon_handle):
await flash_falcon_handle.health(300)
return flash_falco... | text-generation-inference/integration-tests/models/test_flash_falcon.py/0 | {
"file_path": "text-generation-inference/integration-tests/models/test_flash_falcon.py",
"repo_id": "text-generation-inference",
"token_count": 908
} | 233 |
import pytest
import base64
@pytest.fixture(scope="module")
def flash_pali_gemma_handle(launcher):
with launcher(
"google/paligemma-3b-pt-224",
num_shard=1,
revision="float16",
max_input_length=4000,
max_total_tokens=4096,
) as handle:
yield handle
@pytest.fix... | text-generation-inference/integration-tests/models/test_flash_pali_gemma.py/0 | {
"file_path": "text-generation-inference/integration-tests/models/test_flash_pali_gemma.py",
"repo_id": "text-generation-inference",
"token_count": 801
} | 234 |
import pytest
@pytest.fixture(scope="module")
def neox_handle(launcher):
with launcher(
"stabilityai/stablelm-tuned-alpha-3b", num_shard=1, use_flash_attention=False
) as handle:
yield handle
@pytest.fixture(scope="module")
async def neox(neox_handle):
await neox_handle.health(300)
r... | text-generation-inference/integration-tests/models/test_neox.py/0 | {
"file_path": "text-generation-inference/integration-tests/models/test_neox.py",
"repo_id": "text-generation-inference",
"token_count": 515
} | 235 |
import json
import datasets
import tqdm
def main():
dataset = datasets.load_dataset("Open-Orca/OpenOrca", split="train")
# Select only the first 2k conversations that start with a human.
max = min(2000, len(dataset))
conversations = []
for item in tqdm.tqdm(dataset, total=max):
conversatio... | text-generation-inference/load_tests/orca.py/0 | {
"file_path": "text-generation-inference/load_tests/orca.py",
"repo_id": "text-generation-inference",
"token_count": 313
} | 236 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.