text stringlengths 7 1.24M | id stringlengths 14 166 | metadata dict | __index_level_0__ int64 0 519 |
|---|---|---|---|
<!--Copyright 2024 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | diffusers/docs/source/en/using-diffusers/push_to_hub.md/0 | {
"file_path": "diffusers/docs/source/en/using-diffusers/push_to_hub.md",
"repo_id": "diffusers",
"token_count": 2083
} | 107 |
<!--Copyright 2024 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | diffusers/docs/source/ja/index.md/0 | {
"file_path": "diffusers/docs/source/ja/index.md",
"repo_id": "diffusers",
"token_count": 2031
} | 108 |
<!--Copyright 2024 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | diffusers/docs/source/ko/optimization/fp16.md/0 | {
"file_path": "diffusers/docs/source/ko/optimization/fp16.md",
"repo_id": "diffusers",
"token_count": 10775
} | 109 |
<!--Copyright 2024 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | diffusers/docs/source/ko/training/instructpix2pix.md/0 | {
"file_path": "diffusers/docs/source/ko/training/instructpix2pix.md",
"repo_id": "diffusers",
"token_count": 5650
} | 110 |
<!--Copyright 2024 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | diffusers/docs/source/ko/using-diffusers/loading.md/0 | {
"file_path": "diffusers/docs/source/ko/using-diffusers/loading.md",
"repo_id": "diffusers",
"token_count": 14640
} | 111 |
<!--Copyright 2024 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | diffusers/docs/source/pt/quicktour.md/0 | {
"file_path": "diffusers/docs/source/pt/quicktour.md",
"repo_id": "diffusers",
"token_count": 6766
} | 112 |
import glob
import os
from typing import Dict, List, Union
import safetensors.torch
import torch
from huggingface_hub import snapshot_download
from huggingface_hub.utils import validate_hf_hub_args
from diffusers import DiffusionPipeline, __version__
from diffusers.schedulers.scheduling_utils import SCHEDULER_CONFIG_... | diffusers/examples/community/checkpoint_merger.py/0 | {
"file_path": "diffusers/examples/community/checkpoint_merger.py",
"repo_id": "diffusers",
"token_count": 6055
} | 113 |
# Copyright 2024 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-2.0
#
# Unless required by applicable l... | diffusers/examples/community/pipeline_stable_diffusion_xl_instandid_img2img.py/0 | {
"file_path": "diffusers/examples/community/pipeline_stable_diffusion_xl_instandid_img2img.py",
"repo_id": "diffusers",
"token_count": 22982
} | 114 |
# Inference Examples
**The inference examples folder is deprecated and will be removed in a future version**.
**Officially supported inference examples can be found in the [Pipelines folder](https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines)**.
- For `Image-to-Image text-guided generation wit... | diffusers/examples/inference/README.md/0 | {
"file_path": "diffusers/examples/inference/README.md",
"repo_id": "diffusers",
"token_count": 252
} | 115 |
import d4rl # noqa
import gym
import tqdm
from diffusers.experimental import ValueGuidedRLPipeline
config = {
"n_samples": 64,
"horizon": 32,
"num_inference_steps": 20,
"n_guide_steps": 2, # can set to 0 for faster sampling, does not use value network
"scale_grad_by_std": True,
"scale": 0.1,... | diffusers/examples/reinforcement_learning/run_diffuser_locomotion.py/0 | {
"file_path": "diffusers/examples/reinforcement_learning/run_diffuser_locomotion.py",
"repo_id": "diffusers",
"token_count": 724
} | 116 |
# Multi Subject Dreambooth for Inpainting Models
Please note that this project is not actively maintained. However, you can open an issue and tag @gzguevara.
[DreamBooth](https://arxiv.org/abs/2208.12242) is a method to personalize text2image models like stable diffusion given just a few(3~5) images of a subject. Thi... | diffusers/examples/research_projects/multi_subject_dreambooth_inpainting/README.md/0 | {
"file_path": "diffusers/examples/research_projects/multi_subject_dreambooth_inpainting/README.md",
"repo_id": "diffusers",
"token_count": 1665
} | 117 |
## Training examples
Creating a training image set is [described in a different document](https://huggingface.co/docs/datasets/image_process#image-datasets).
### Installing the dependencies
Before running the scripts, make sure to install the library's training dependencies:
**Important**
To make sure you can succ... | diffusers/examples/research_projects/onnxruntime/unconditional_image_generation/README.md/0 | {
"file_path": "diffusers/examples/research_projects/onnxruntime/unconditional_image_generation/README.md",
"repo_id": "diffusers",
"token_count": 500
} | 118 |
import argparse
from typing import Dict
import torch
import torch.nn as nn
from diffusers import SparseControlNetModel
KEYS_RENAME_MAPPING = {
".attention_blocks.0": ".attn1",
".attention_blocks.1": ".attn2",
".attn1.pos_encoder": ".pos_embed",
".ff_norm": ".norm3",
".norms.0": ".norm1",
".n... | diffusers/scripts/convert_animatediff_sparsectrl_to_diffusers.py/0 | {
"file_path": "diffusers/scripts/convert_animatediff_sparsectrl_to_diffusers.py",
"repo_id": "diffusers",
"token_count": 1144
} | 119 |
# coding=utf-8
# Copyright 2024 The HuggingFace Inc. team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... | diffusers/scripts/convert_original_controlnet_to_diffusers.py/0 | {
"file_path": "diffusers/scripts/convert_original_controlnet_to_diffusers.py",
"repo_id": "diffusers",
"token_count": 1608
} | 120 |
import argparse
from transformers import CLIPImageProcessor, CLIPVisionModelWithProjection
from diffusers import UnCLIPImageVariationPipeline, UnCLIPPipeline
if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argument("--dump_path", default=None, type=str, required=True, help="Path to... | diffusers/scripts/convert_unclip_txt2img_to_image_variation.py/0 | {
"file_path": "diffusers/scripts/convert_unclip_txt2img_to_image_variation.py",
"repo_id": "diffusers",
"token_count": 554
} | 121 |
# coding=utf-8
# Copyright 2024 The HuggingFace Inc. team.
# Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.a... | diffusers/src/diffusers/configuration_utils.py/0 | {
"file_path": "diffusers/src/diffusers/configuration_utils.py",
"repo_id": "diffusers",
"token_count": 13773
} | 122 |
# coding=utf-8
# Copyright 2024 The HuggingFace Inc. team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... | diffusers/src/diffusers/loaders/single_file_utils.py/0 | {
"file_path": "diffusers/src/diffusers/loaders/single_file_utils.py",
"repo_id": "diffusers",
"token_count": 40861
} | 123 |
# Copyright 2024 The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... | diffusers/src/diffusers/models/autoencoders/autoencoder_kl_temporal_decoder.py/0 | {
"file_path": "diffusers/src/diffusers/models/autoencoders/autoencoder_kl_temporal_decoder.py",
"repo_id": "diffusers",
"token_count": 7200
} | 124 |
# Copyright 2024 The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... | diffusers/src/diffusers/models/lora.py/0 | {
"file_path": "diffusers/src/diffusers/models/lora.py",
"repo_id": "diffusers",
"token_count": 7972
} | 125 |
# 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 re... | diffusers/src/diffusers/models/transformers/latte_transformer_3d.py/0 | {
"file_path": "diffusers/src/diffusers/models/transformers/latte_transformer_3d.py",
"repo_id": "diffusers",
"token_count": 7099
} | 126 |
# Copyright 2024 The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... | diffusers/src/diffusers/models/unets/unet_2d_condition.py/0 | {
"file_path": "diffusers/src/diffusers/models/unets/unet_2d_condition.py",
"repo_id": "diffusers",
"token_count": 29803
} | 127 |
from typing import TYPE_CHECKING
from ...utils import (
DIFFUSERS_SLOW_IMPORT,
OptionalDependencyNotAvailable,
_LazyModule,
is_torch_available,
is_transformers_available,
)
_dummy_objects = {}
_import_structure = {}
try:
if not (is_transformers_available() and is_torch_available()):
... | diffusers/src/diffusers/pipelines/amused/__init__.py/0 | {
"file_path": "diffusers/src/diffusers/pipelines/amused/__init__.py",
"repo_id": "diffusers",
"token_count": 796
} | 128 |
from typing import TYPE_CHECKING
from ...utils import DIFFUSERS_SLOW_IMPORT, _LazyModule
_import_structure = {"pipeline_ddim": ["DDIMPipeline"]}
if TYPE_CHECKING or DIFFUSERS_SLOW_IMPORT:
from .pipeline_ddim import DDIMPipeline
else:
import sys
sys.modules[__name__] = _LazyModule(
__name__,
... | diffusers/src/diffusers/pipelines/ddim/__init__.py/0 | {
"file_path": "diffusers/src/diffusers/pipelines/ddim/__init__.py",
"repo_id": "diffusers",
"token_count": 180
} | 129 |
from typing import TYPE_CHECKING
from ...utils import (
DIFFUSERS_SLOW_IMPORT,
OptionalDependencyNotAvailable,
_LazyModule,
get_objects_from_module,
is_librosa_available,
is_note_seq_available,
is_torch_available,
is_transformers_available,
)
_dummy_objects = {}
_import_structure = {}... | diffusers/src/diffusers/pipelines/deprecated/__init__.py/0 | {
"file_path": "diffusers/src/diffusers/pipelines/deprecated/__init__.py",
"repo_id": "diffusers",
"token_count": 2227
} | 130 |
# Copyright 2024 The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... | diffusers/src/diffusers/pipelines/deprecated/score_sde_ve/pipeline_score_sde_ve.py/0 | {
"file_path": "diffusers/src/diffusers/pipelines/deprecated/score_sde_ve/pipeline_score_sde_ve.py",
"repo_id": "diffusers",
"token_count": 1759
} | 131 |
from typing import Any, Dict, List, Optional, Tuple, Union
import numpy as np
import torch
import torch.nn as nn
import torch.nn.functional as F
from diffusers.utils import deprecate
from ....configuration_utils import ConfigMixin, register_to_config
from ....models import ModelMixin
from ....models.activations impo... | diffusers/src/diffusers/pipelines/deprecated/versatile_diffusion/modeling_text_unet.py/0 | {
"file_path": "diffusers/src/diffusers/pipelines/deprecated/versatile_diffusion/modeling_text_unet.py",
"repo_id": "diffusers",
"token_count": 55645
} | 132 |
# Copyright 2024 The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... | diffusers/src/diffusers/pipelines/kandinsky2_2/pipeline_kandinsky2_2_inpainting.py/0 | {
"file_path": "diffusers/src/diffusers/pipelines/kandinsky2_2/pipeline_kandinsky2_2_inpainting.py",
"repo_id": "diffusers",
"token_count": 11046
} | 133 |
from dataclasses import dataclass
from typing import TYPE_CHECKING, List, Optional, Union
import numpy as np
import PIL
from PIL import Image
from ...utils import (
DIFFUSERS_SLOW_IMPORT,
OptionalDependencyNotAvailable,
_LazyModule,
get_objects_from_module,
is_torch_available,
is_transformers_... | diffusers/src/diffusers/pipelines/paint_by_example/__init__.py/0 | {
"file_path": "diffusers/src/diffusers/pipelines/paint_by_example/__init__.py",
"repo_id": "diffusers",
"token_count": 599
} | 134 |
# Copyright 2024 Open 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 required ... | diffusers/src/diffusers/pipelines/shap_e/pipeline_shap_e.py/0 | {
"file_path": "diffusers/src/diffusers/pipelines/shap_e/pipeline_shap_e.py",
"repo_id": "diffusers",
"token_count": 5789
} | 135 |
# Copyright 2024 The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... | diffusers/src/diffusers/pipelines/stable_diffusion_k_diffusion/pipeline_stable_diffusion_k_diffusion.py/0 | {
"file_path": "diffusers/src/diffusers/pipelines/stable_diffusion_k_diffusion/pipeline_stable_diffusion_k_diffusion.py",
"repo_id": "diffusers",
"token_count": 14584
} | 136 |
# Copyright 2024 Kakao Brain and The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requi... | diffusers/src/diffusers/pipelines/unclip/pipeline_unclip.py/0 | {
"file_path": "diffusers/src/diffusers/pipelines/unclip/pipeline_unclip.py",
"repo_id": "diffusers",
"token_count": 9934
} | 137 |
# Schedulers
For more information on the schedulers, please refer to the [docs](https://huggingface.co/docs/diffusers/api/schedulers/overview). | diffusers/src/diffusers/schedulers/README.md/0 | {
"file_path": "diffusers/src/diffusers/schedulers/README.md",
"repo_id": "diffusers",
"token_count": 46
} | 138 |
# Copyright 2024 ParaDiGMS authors and The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless... | diffusers/src/diffusers/schedulers/scheduling_ddpm_parallel.py/0 | {
"file_path": "diffusers/src/diffusers/schedulers/scheduling_ddpm_parallel.py",
"repo_id": "diffusers",
"token_count": 13261
} | 139 |
# This file is autogenerated by the command `make fix-copies`, do not edit.
from ..utils import DummyObject, requires_backends
class LMSDiscreteScheduler(metaclass=DummyObject):
_backends = ["torch", "scipy"]
def __init__(self, *args, **kwargs):
requires_backends(self, ["torch", "scipy"])
@class... | diffusers/src/diffusers/utils/dummy_torch_and_scipy_objects.py/0 | {
"file_path": "diffusers/src/diffusers/utils/dummy_torch_and_scipy_objects.py",
"repo_id": "diffusers",
"token_count": 220
} | 140 |
from typing import List
import PIL.Image
import PIL.ImageOps
from packaging import version
from PIL import Image
if version.parse(version.parse(PIL.__version__).base_version) >= version.parse("9.1.0"):
PIL_INTERPOLATION = {
"linear": PIL.Image.Resampling.BILINEAR,
"bilinear": PIL.Image.Resampling... | diffusers/src/diffusers/utils/pil_utils.py/0 | {
"file_path": "diffusers/src/diffusers/utils/pil_utils.py",
"repo_id": "diffusers",
"token_count": 849
} | 141 |
# coding=utf-8
# Copyright 2024 HuggingFace Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | diffusers/tests/models/transformers/test_models_transformer_flux.py/0 | {
"file_path": "diffusers/tests/models/transformers/test_models_transformer_flux.py",
"repo_id": "diffusers",
"token_count": 1685
} | 142 |
# coding=utf-8
# Copyright 2024 HuggingFace Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | diffusers/tests/models/unets/test_unet_blocks_common.py/0 | {
"file_path": "diffusers/tests/models/unets/test_unet_blocks_common.py",
"repo_id": "diffusers",
"token_count": 1805
} | 143 |
# Copyright 2024 The HuggingFace 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 agreed to in... | diffusers/tests/pipelines/cogvideox/test_cogvideox.py/0 | {
"file_path": "diffusers/tests/pipelines/cogvideox/test_cogvideox.py",
"repo_id": "diffusers",
"token_count": 6235
} | 144 |
# coding=utf-8
# Copyright 2024 HuggingFace Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | diffusers/tests/pipelines/kolors/test_kolors_img2img.py/0 | {
"file_path": "diffusers/tests/pipelines/kolors/test_kolors_img2img.py",
"repo_id": "diffusers",
"token_count": 2465
} | 145 |
# coding=utf-8
# Copyright 2024 HuggingFace Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | diffusers/tests/pipelines/stable_diffusion_2/test_stable_diffusion.py/0 | {
"file_path": "diffusers/tests/pipelines/stable_diffusion_2/test_stable_diffusion.py",
"repo_id": "diffusers",
"token_count": 12036
} | 146 |
import contextlib
import gc
import inspect
import io
import json
import os
import re
import tempfile
import unittest
import uuid
from typing import Any, Callable, Dict, Union
import numpy as np
import PIL.Image
import torch
import torch.nn as nn
from huggingface_hub import ModelCard, delete_repo
from huggingface_hub.u... | diffusers/tests/pipelines/test_pipelines_common.py/0 | {
"file_path": "diffusers/tests/pipelines/test_pipelines_common.py",
"repo_id": "diffusers",
"token_count": 42311
} | 147 |
import gc
import unittest
import torch
from diffusers import StableDiffusionXLInstructPix2PixPipeline
from diffusers.utils.testing_utils import (
enable_full_determinism,
require_torch_gpu,
slow,
)
enable_full_determinism()
@slow
@require_torch_gpu
class StableDiffusionXLInstructPix2PixPipeline(unitte... | diffusers/tests/single_file/test_stable_diffusion_xl_instruct_pix2pix.py/0 | {
"file_path": "diffusers/tests/single_file/test_stable_diffusion_xl_instruct_pix2pix.py",
"repo_id": "diffusers",
"token_count": 659
} | 148 |
# coding=utf-8
# Copyright 2024 The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requir... | diffusers/utils/notify_slack_about_release.py/0 | {
"file_path": "diffusers/utils/notify_slack_about_release.py",
"repo_id": "diffusers",
"token_count": 985
} | 149 |
.PHONY: tests
PYTHON_PATH := $(shell which python)
# If Poetry is installed, redefine PYTHON_PATH to use the Poetry-managed Python
POETRY_CHECK := $(shell command -v poetry)
ifneq ($(POETRY_CHECK),)
PYTHON_PATH := $(shell poetry run which python)
endif
export PATH := $(dir $(PYTHON_PATH)):$(PATH)
DEVICE ?= cpu
bu... | lerobot/Makefile/0 | {
"file_path": "lerobot/Makefile",
"repo_id": "lerobot",
"token_count": 2300
} | 150 |
In this tutorial we will learn how to adapt a policy configuration to be compatible with a new environment and dataset. As a concrete example, we will adapt the default configuration for ACT to be compatible with the PushT environment and dataset.
If you haven't already read our tutorial on the [training script and co... | lerobot/examples/advanced/1_train_act_pusht/train_act_pusht.md/0 | {
"file_path": "lerobot/examples/advanced/1_train_act_pusht/train_act_pusht.md",
"repo_id": "lerobot",
"token_count": 1009
} | 151 |
#!/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/utils.py/0 | {
"file_path": "lerobot/lerobot/common/datasets/push_dataset_to_hub/utils.py",
"repo_id": "lerobot",
"token_count": 1016
} | 152 |
#!/usr/bin/env python
# Copyright 2024 Nicklas Hansen, Xiaolong Wang, Hao Su,
# 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
#
# ht... | lerobot/lerobot/common/policies/tdmpc/configuration_tdmpc.py/0 | {
"file_path": "lerobot/lerobot/common/policies/tdmpc/configuration_tdmpc.py",
"repo_id": "lerobot",
"token_count": 4030
} | 153 |
# @package _global_
# Defaults for training for the PushT dataset.
seed: 100000
dataset_repo_id: lerobot/pusht
override_dataset_stats:
# TODO(rcadene, alexander-soare): should we remove image stats as well? do we use a pretrained vision model?
observation.image:
mean: [[[0.5]], [[0.5]], [[0.5]]] # (c,1,1)
... | lerobot/lerobot/configs/policy/vqbet.yaml/0 | {
"file_path": "lerobot/lerobot/configs/policy/vqbet.yaml",
"repo_id": "lerobot",
"token_count": 1157
} | 154 |
version https://git-lfs.github.com/spec/v1
oid sha256:34ece24fb6b302db0b68987858509f31713fb299faa9a9d34b8fd68f10bc3100
size 247
| lerobot/tests/data/lerobot/aloha_mobile_cabinet/train/state.json/0 | {
"file_path": "lerobot/tests/data/lerobot/aloha_mobile_cabinet/train/state.json",
"repo_id": "lerobot",
"token_count": 63
} | 155 |
version https://git-lfs.github.com/spec/v1
oid sha256:75f53d221827f17cc2ded3908452e24331b39b79dc3a26f2b9d89a6e6894baab
size 887728
| lerobot/tests/data/lerobot/aloha_mobile_elevator/train/data-00000-of-00001.arrow/0 | {
"file_path": "lerobot/tests/data/lerobot/aloha_mobile_elevator/train/data-00000-of-00001.arrow",
"repo_id": "lerobot",
"token_count": 67
} | 156 |
version https://git-lfs.github.com/spec/v1
oid sha256:a85e57264325cc0927450e30a85dd0eacb0a70ebdb00c4e2ac043a57f9c200e2
size 2904
| lerobot/tests/data/lerobot/aloha_sim_insertion_scripted/meta_data/stats.safetensors/0 | {
"file_path": "lerobot/tests/data/lerobot/aloha_sim_insertion_scripted/meta_data/stats.safetensors",
"repo_id": "lerobot",
"token_count": 67
} | 157 |
version https://git-lfs.github.com/spec/v1
oid sha256:bf10e41f2df8c5dc1c19ba8e2d2256ec9d81bdbe28b95079d28039fe2a28504c
size 247
| lerobot/tests/data/lerobot/aloha_sim_transfer_cube_human/train/state.json/0 | {
"file_path": "lerobot/tests/data/lerobot/aloha_sim_transfer_cube_human/train/state.json",
"repo_id": "lerobot",
"token_count": 66
} | 158 |
version https://git-lfs.github.com/spec/v1
oid sha256:8fde6f0b494eedd8a70d31bb98430cd430d158bfc33faf7580bdabe65a33ec1c
size 161640
| lerobot/tests/data/lerobot/aloha_static_cups_open/train/data-00000-of-00001.arrow/0 | {
"file_path": "lerobot/tests/data/lerobot/aloha_static_cups_open/train/data-00000-of-00001.arrow",
"repo_id": "lerobot",
"token_count": 65
} | 159 |
version https://git-lfs.github.com/spec/v1
oid sha256:fd72ad4c52fe15cc22c82cbdf4d9799ed0279c275272c9df146cf7dbada364aa
size 247
| lerobot/tests/data/lerobot/aloha_static_pro_pencil/train/state.json/0 | {
"file_path": "lerobot/tests/data/lerobot/aloha_static_pro_pencil/train/state.json",
"repo_id": "lerobot",
"token_count": 60
} | 160 |
version https://git-lfs.github.com/spec/v1
oid sha256:a522c7815565f1f81a8bb5a853263405ab8c3b087ecbc7a3b004848891d77342
size 247
| lerobot/tests/data/lerobot/pusht/train/state.json/0 | {
"file_path": "lerobot/tests/data/lerobot/pusht/train/state.json",
"repo_id": "lerobot",
"token_count": 67
} | 161 |
version https://git-lfs.github.com/spec/v1
oid sha256:624b434e00d6996304c62212b85dda1bc2a813d5754bcb9aa6375efabca77113
size 3720
| lerobot/tests/data/lerobot/umi_cup_in_the_wild/meta_data/stats.safetensors/0 | {
"file_path": "lerobot/tests/data/lerobot/umi_cup_in_the_wild/meta_data/stats.safetensors",
"repo_id": "lerobot",
"token_count": 65
} | 162 |
version https://git-lfs.github.com/spec/v1
oid sha256:2a00171a0349ede19d3f036b0710b861c8a2856d481ce8b4049ba06825a61e7b
size 195992
| lerobot/tests/data/lerobot/unitreeh1_warehouse/train/data-00000-of-00001.arrow/0 | {
"file_path": "lerobot/tests/data/lerobot/unitreeh1_warehouse/train/data-00000-of-00001.arrow",
"repo_id": "lerobot",
"token_count": 67
} | 163 |
version https://git-lfs.github.com/spec/v1
oid sha256:5dd39a554c9c3db537e98c9ceade024d172c46c4fa7ce9e27601b94116445417
size 33400
| lerobot/tests/data/save_policy_to_safetensors/aloha_act/param_stats.safetensors/0 | {
"file_path": "lerobot/tests/data/save_policy_to_safetensors/aloha_act/param_stats.safetensors",
"repo_id": "lerobot",
"token_count": 64
} | 164 |
version https://git-lfs.github.com/spec/v1
oid sha256:60775e91ed550aae66cb0547ee4b0e38917f29172e942671e9361b3812364df6
size 49120
| lerobot/tests/data/save_policy_to_safetensors/pusht_diffusion/param_stats.safetensors/0 | {
"file_path": "lerobot/tests/data/save_policy_to_safetensors/pusht_diffusion/param_stats.safetensors",
"repo_id": "lerobot",
"token_count": 62
} | 165 |
#!/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_envs.py/0 | {
"file_path": "lerobot/tests/test_envs.py",
"repo_id": "lerobot",
"token_count": 839
} | 166 |
# Training Parler-TTS
<a target="_blank" href="https://github.com/ylacombe/scripts_and_notebooks/blob/main/Finetuning_Parler_TTS_v1_on_a_single_speaker_dataset.ipynb">
<img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/>
</a>
**TL;DR:** After having followed the [installation ... | parler-tts/training/README.md/0 | {
"file_path": "parler-tts/training/README.md",
"repo_id": "parler-tts",
"token_count": 4478
} | 167 |
<!--โ ๏ธ 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.
-->
# Fully Sharded Data Parallel
[Fully sharded data parallel](https://pytorch.org/docs/stable/fsdp.html) (FSDP) is developed for distributed training ... | peft/docs/source/accelerate/fsdp.md/0 | {
"file_path": "peft/docs/source/accelerate/fsdp.md",
"repo_id": "peft",
"token_count": 4901
} | 168 |
<!--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/install.md/0 | {
"file_path": "peft/docs/source/install.md",
"repo_id": "peft",
"token_count": 436
} | 169 |
<jupyter_start><jupyter_text>Fine-tuning [Llama-3-8B](https://huggingface.co/meta-llama/Meta-Llama-3-8B) on [timdettmers/openassistant-guanaco](https://huggingface.co/datasets/timdettmers/openassistant-guanaco) Dataset using QDora (quantized Lora w/ use_dora=True) on T4 Free Colab GPU.<jupyter_code># Install the librar... | peft/examples/dora_finetuning/QDoRA_finetuning.ipynb/0 | {
"file_path": "peft/examples/dora_finetuning/QDoRA_finetuning.ipynb",
"repo_id": "peft",
"token_count": 2118
} | 170 |
import argparse
import os
from collections import Counter
from dataclasses import dataclass
from typing import Dict, Optional
import safetensors
import torch
from diffusers import UNet2DConditionModel
from transformers import CLIPTextModel
from peft import LoraConfig, get_peft_model, get_peft_model_state_dict, set_pe... | peft/examples/lora_dreambooth/convert_kohya_ss_sd_lora_to_peft.py/0 | {
"file_path": "peft/examples/lora_dreambooth/convert_kohya_ss_sd_lora_to_peft.py",
"repo_id": "peft",
"token_count": 2947
} | 171 |
# 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/pissa_finetuning/preprocess.py/0 | {
"file_path": "peft/examples/pissa_finetuning/preprocess.py",
"repo_id": "peft",
"token_count": 914
} | 172 |
# 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/adaption_prompt/utils.py/0 | {
"file_path": "peft/src/peft/tuners/adaption_prompt/utils.py",
"repo_id": "peft",
"token_count": 2179
} | 173 |
# Copyright 2023-present the HuggingFace Inc. team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | peft/src/peft/tuners/ia3/__init__.py/0 | {
"file_path": "peft/src/peft/tuners/ia3/__init__.py",
"repo_id": "peft",
"token_count": 379
} | 174 |
# Copyright 2023-present the HuggingFace Inc. team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | peft/src/peft/tuners/prefix_tuning/config.py/0 | {
"file_path": "peft/src/peft/tuners/prefix_tuning/config.py",
"repo_id": "peft",
"token_count": 447
} | 175 |
# Copyright 2023-present the HuggingFace Inc. team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | peft/src/peft/utils/constants.py/0 | {
"file_path": "peft/src/peft/utils/constants.py",
"repo_id": "peft",
"token_count": 4663
} | 176 |
# Copyright 2023-present the HuggingFace Inc. team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | peft/tests/test_decoder_models.py/0 | {
"file_path": "peft/tests/test_decoder_models.py",
"repo_id": "peft",
"token_count": 9436
} | 177 |
#!/usr/bin/env python3
# coding=utf-8
# 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
#... | peft/tests/test_tuners_utils.py/0 | {
"file_path": "peft/tests/test_tuners_utils.py",
"repo_id": "peft",
"token_count": 21022
} | 178 |
#!/usr/bin/env python3
""" Checkpoint Averaging Script
This script averages all model weights for checkpoints in specified path that match
the specified filter wildcard. All checkpoints must be from the exact same model.
For any hope of decent results, the checkpoints should be from the same or child
(via resumes) tr... | pytorch-image-models/avg_checkpoints.py/0 | {
"file_path": "pytorch-image-models/avg_checkpoints.py",
"repo_id": "pytorch-image-models",
"token_count": 2377
} | 179 |
# AdvProp (EfficientNet)
**AdvProp** is an adversarial training scheme which treats adversarial examples as additional examples, to prevent overfitting. Key to the method is the usage of a separate auxiliary batch norm for adversarial examples, as they have different underlying distributions to normal examples.
The w... | pytorch-image-models/hfdocs/source/models/advprop.mdx/0 | {
"file_path": "pytorch-image-models/hfdocs/source/models/advprop.mdx",
"repo_id": "pytorch-image-models",
"token_count": 6032
} | 180 |
# NASNet
**NASNet** is a type of convolutional neural network discovered through neural architecture search. The building blocks consist of normal and reduction cells.
## How do I use this model on an image?
To load a pretrained model:
```py
>>> import timm
>>> model = timm.create_model('nasnetalarge', pretrained=T... | pytorch-image-models/hfdocs/source/models/nasnet.mdx/0 | {
"file_path": "pytorch-image-models/hfdocs/source/models/nasnet.mdx",
"repo_id": "pytorch-image-models",
"token_count": 1536
} | 181 |
# SK-ResNeXt
**SK ResNeXt** is a variant of a [ResNeXt](https://www.paperswithcode.com/method/resnext) that employs a [Selective Kernel](https://paperswithcode.com/method/selective-kernel) unit. In general, all the large kernel convolutions in the original bottleneck blocks in ResNext are replaced by the proposed [SK ... | pytorch-image-models/hfdocs/source/models/skresnext.mdx/0 | {
"file_path": "pytorch-image-models/hfdocs/source/models/skresnext.mdx",
"repo_id": "pytorch-image-models",
"token_count": 1643
} | 182 |
# Models
[[autodoc]] timm.create_model
[[autodoc]] timm.list_models
| pytorch-image-models/hfdocs/source/reference/models.mdx/0 | {
"file_path": "pytorch-image-models/hfdocs/source/reference/models.mdx",
"repo_id": "pytorch-image-models",
"token_count": 29
} | 183 |
""" AutoAugment, RandAugment, AugMix, and 3-Augment for PyTorch
This code implements the searched ImageNet policies with various tweaks and improvements and
does not include any of the search code.
AA and RA Implementation adapted from:
https://github.com/tensorflow/tpu/blob/master/models/official/efficientnet/au... | pytorch-image-models/timm/data/auto_augment.py/0 | {
"file_path": "pytorch-image-models/timm/data/auto_augment.py",
"repo_id": "pytorch-image-models",
"token_count": 15929
} | 184 |
""" Dataset reader that wraps Hugging Face datasets
Hacked together by / Copyright 2022 Ross Wightman
"""
import io
import math
from typing import Optional
import torch
import torch.distributed as dist
from PIL import Image
try:
import datasets
except ImportError as e:
print("Please install Hugging Face data... | pytorch-image-models/timm/data/readers/reader_hfds.py/0 | {
"file_path": "pytorch-image-models/timm/data/readers/reader_hfds.py",
"repo_id": "pytorch-image-models",
"token_count": 1150
} | 185 |
from typing import List, Optional, Union
import torch
from torch import nn as nn
from torch.nn import functional as F
from .config import use_fused_attn
from .create_conv2d import create_conv2d
from .helpers import to_2tuple
from .pool2d_same import create_pool2d
class MultiQueryAttentionV2(nn.Module):
"""Multi... | pytorch-image-models/timm/layers/attention2d.py/0 | {
"file_path": "pytorch-image-models/timm/layers/attention2d.py",
"repo_id": "pytorch-image-models",
"token_count": 6643
} | 186 |
""" DropBlock, DropPath
PyTorch implementations of DropBlock and DropPath (Stochastic Depth) regularization layers.
Papers:
DropBlock: A regularization method for convolutional networks (https://arxiv.org/abs/1810.12890)
Deep Networks with Stochastic Depth (https://arxiv.org/abs/1603.09382)
Code:
DropBlock impl ins... | pytorch-image-models/timm/layers/drop.py/0 | {
"file_path": "pytorch-image-models/timm/layers/drop.py",
"repo_id": "pytorch-image-models",
"token_count": 3016
} | 187 |
import torch
from torch import nn
class LayerScale(nn.Module):
""" LayerScale on tensors with channels in last-dim.
"""
def __init__(
self,
dim: int,
init_values: float = 1e-5,
inplace: bool = False,
) -> None:
super().__init__()
self.inp... | pytorch-image-models/timm/layers/layer_scale.py/0 | {
"file_path": "pytorch-image-models/timm/layers/layer_scale.py",
"repo_id": "pytorch-image-models",
"token_count": 482
} | 188 |
""" Selective Kernel Convolution/Attention
Paper: Selective Kernel Networks (https://arxiv.org/abs/1903.06586)
Hacked together by / Copyright 2020 Ross Wightman
"""
import torch
from torch import nn as nn
from .conv_bn_act import ConvNormAct
from .helpers import make_divisible
from .trace_utils import _assert
def ... | pytorch-image-models/timm/layers/selective_kernel.py/0 | {
"file_path": "pytorch-image-models/timm/layers/selective_kernel.py",
"repo_id": "pytorch-image-models",
"token_count": 2314
} | 189 |
from .beit import *
from .byoanet import *
from .byobnet import *
from .cait import *
from .coat import *
from .convit import *
from .convmixer import *
from .convnext import *
from .crossvit import *
from .cspnet import *
from .davit import *
from .deit import *
from .densenet import *
from .dla import *
from .dpn imp... | pytorch-image-models/timm/models/__init__.py/0 | {
"file_path": "pytorch-image-models/timm/models/__init__.py",
"repo_id": "pytorch-image-models",
"token_count": 1118
} | 190 |
""" PyTorch implementation of DualPathNetworks
Based on original MXNet implementation https://github.com/cypw/DPNs with
many ideas from another PyTorch implementation https://github.com/oyam/pytorch-DPNs.
This implementation is compatible with the pretrained weights from cypw's MXNet implementation.
Hacked together b... | pytorch-image-models/timm/models/dpn.py/0 | {
"file_path": "pytorch-image-models/timm/models/dpn.py",
"repo_id": "pytorch-image-models",
"token_count": 7004
} | 191 |
from ._builder import *
from ._helpers import *
from ._manipulate import *
from ._prune import *
import warnings
warnings.warn(f"Importing from {__name__} is deprecated, please import via timm.models", DeprecationWarning)
| pytorch-image-models/timm/models/helpers.py/0 | {
"file_path": "pytorch-image-models/timm/models/helpers.py",
"repo_id": "pytorch-image-models",
"token_count": 64
} | 192 |
""" MobileViT
Paper:
V1: `MobileViT: Light-weight, General-purpose, and Mobile-friendly Vision Transformer` - https://arxiv.org/abs/2110.02178
V2: `Separable Self-attention for Mobile Vision Transformers` - https://arxiv.org/abs/2206.02680
MobileVitBlock and checkpoints adapted from https://github.com/apple/ml-cvnets... | pytorch-image-models/timm/models/mobilevit.py/0 | {
"file_path": "pytorch-image-models/timm/models/mobilevit.py",
"repo_id": "pytorch-image-models",
"token_count": 12812
} | 193 |
"""PyTorch ResNet
This started as a copy of https://github.com/pytorch/vision 'resnet.py' (BSD-3-Clause) with
additional dropout and dynamic global avg/max pool.
ResNeXt, SE-ResNeXt, SENet, and MXNet Gluon stem/downsample variants, tiered stems added by Ross Wightman
Copyright 2019, Ross Wightman
"""
import math
fro... | pytorch-image-models/timm/models/resnet.py/0 | {
"file_path": "pytorch-image-models/timm/models/resnet.py",
"repo_id": "pytorch-image-models",
"token_count": 45387
} | 194 |
""" Vision Transformer (ViT) in PyTorch
A PyTorch implement of Vision Transformers as described in:
'An Image Is Worth 16 x 16 Words: Transformers for Image Recognition at Scale'
- https://arxiv.org/abs/2010.11929
`How to train your ViT? Data, Augmentation, and Regularization in Vision Transformers`
- https:... | pytorch-image-models/timm/models/vision_transformer.py/0 | {
"file_path": "pytorch-image-models/timm/models/vision_transformer.py",
"repo_id": "pytorch-image-models",
"token_count": 69254
} | 195 |
""" Adan Optimizer
Adan: Adaptive Nesterov Momentum Algorithm for Faster Optimizing Deep Models[J]. arXiv preprint arXiv:2208.06677, 2022.
https://arxiv.org/abs/2208.06677
Implementation adapted from https://github.com/sail-sg/Adan
"""
import math
import torch
from torch.optim import Optimizer
class Adan(Opt... | pytorch-image-models/timm/optim/adan.py/0 | {
"file_path": "pytorch-image-models/timm/optim/adan.py",
"repo_id": "pytorch-image-models",
"token_count": 2501
} | 196 |
""" MultiStep LR Scheduler
Basic multi step LR schedule with warmup, noise.
"""
import torch
import bisect
from timm.scheduler.scheduler import Scheduler
from typing import List
class MultiStepLRScheduler(Scheduler):
"""
"""
def __init__(
self,
optimizer: torch.optim.Optimizer,
... | pytorch-image-models/timm/scheduler/multistep_lr.py/0 | {
"file_path": "pytorch-image-models/timm/scheduler/multistep_lr.py",
"repo_id": "pytorch-image-models",
"token_count": 1036
} | 197 |
""" Logging helpers
Hacked together by / Copyright 2020 Ross Wightman
"""
import logging
import logging.handlers
class FormatterNoInfo(logging.Formatter):
def __init__(self, fmt='%(levelname)s: %(message)s'):
logging.Formatter.__init__(self, fmt)
def format(self, record):
if record.levelno =... | pytorch-image-models/timm/utils/log.py/0 | {
"file_path": "pytorch-image-models/timm/utils/log.py",
"repo_id": "pytorch-image-models",
"token_count": 383
} | 198 |
# Rust builder
FROM lukemathwalker/cargo-chef:latest-rust-1.80 AS chef
WORKDIR /usr/src
ARG CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse
FROM chef AS planner
COPY Cargo.lock Cargo.lock
COPY Cargo.toml Cargo.toml
COPY rust-toolchain.toml rust-toolchain.toml
COPY proto proto
COPY benchmark benchmark
COPY router router
CO... | text-generation-inference/Dockerfile/0 | {
"file_path": "text-generation-inference/Dockerfile",
"repo_id": "text-generation-inference",
"token_count": 3986
} | 199 |
//
// Created by Morgan Funtowicz on 6/30/24.
//
#ifndef TGI_TRTLLM_BACKEND_H
#define TGI_TRTLLM_BACKEND_H
#include <cmath>
#include <filesystem>
#include <span>
#include <vector>
#include <nlohmann/json.hpp>
#include <tensorrt_llm/runtime/common.h>
#include <tensorrt_llm/executor/executor.h>
#include <tensorrt_llm... | text-generation-inference/backends/trtllm/include/backend.h/0 | {
"file_path": "text-generation-inference/backends/trtllm/include/backend.h",
"repo_id": "text-generation-inference",
"token_count": 1425
} | 200 |
<html>
<head>
<!-- Load the latest Swagger UI code and style from npm using unpkg.com -->
<script src="https://unpkg.com/swagger-ui-dist@3/swagger-ui-bundle.js"></script>
<link rel="stylesheet" type="text/css" href="https://unpkg.com/swagger-ui-dist@3/swagger-ui.css"/>
<title>Text Ge... | text-generation-inference/docs/index.html/0 | {
"file_path": "text-generation-inference/docs/index.html",
"repo_id": "text-generation-inference",
"token_count": 653
} | 201 |
# LoRA (Low-Rank Adaptation)
## What is LoRA?
LoRA is a technique that allows for efficent fine-tuning a model while only updating a small portion of the model's weights. This is useful when you have a large model that has been pre-trained on a large dataset, but you want to fine-tune it on a smaller dataset or for a... | text-generation-inference/docs/source/conceptual/lora.md/0 | {
"file_path": "text-generation-inference/docs/source/conceptual/lora.md",
"repo_id": "text-generation-inference",
"token_count": 1099
} | 202 |
# Text-generation-launcher arguments
<!-- WRAP CODE BLOCKS -->
```shell
Text Generation Launcher
Usage: text-generation-launcher [OPTIONS]
Options:
```
## MODEL_ID
```shell
--model-id <MODEL_ID>
The name of the model to load. Can be a MODEL_ID as listed on <https://hf.co/models> like `gpt2` or `Open... | text-generation-inference/docs/source/reference/launcher.md/0 | {
"file_path": "text-generation-inference/docs/source/reference/launcher.md",
"repo_id": "text-generation-inference",
"token_count": 7102
} | 203 |
[
{
"choices": [
{
"finish_reason": "",
"index": 0,
"logprobs": null,
"text": "\n"
}
],
"created": 1724833943,
"id": "",
"model": "TinyLlama/TinyLlama-1.1B-Chat-v1.0",
"object": "text_completion",
"system_fingerprint": "2.2.1-dev0-native"
},
... | text-generation-inference/integration-tests/models/__snapshots__/test_completion_prompts/test_flash_llama_completion_many_prompts_stream.json/0 | {
"file_path": "text-generation-inference/integration-tests/models/__snapshots__/test_completion_prompts/test_flash_llama_completion_many_prompts_stream.json",
"repo_id": "text-generation-inference",
"token_count": 7199
} | 204 |
{
"details": {
"best_of_sequences": null,
"finish_reason": "length",
"generated_tokens": 10,
"prefill": [
{
"id": 2,
"logprob": null,
"text": "<bos>"
},
{
"id": 106,
"logprob": -47.25,
"text": "<start_of_turn>"
},
{
... | text-generation-inference/integration-tests/models/__snapshots__/test_flash_gemma2/test_flash_gemma2.json/0 | {
"file_path": "text-generation-inference/integration-tests/models/__snapshots__/test_flash_gemma2/test_flash_gemma2.json",
"repo_id": "text-generation-inference",
"token_count": 3079
} | 205 |
{
"details": {
"best_of_sequences": null,
"finish_reason": "length",
"generated_tokens": 10,
"prefill": [
{
"id": 2323,
"logprob": null,
"text": "Test"
},
{
"id": 1715,
"logprob": -11.453125,
"text": " request"
}
],
"seed"... | text-generation-inference/integration-tests/models/__snapshots__/test_flash_llama_exl2/test_flash_llama_exl2_all_params.json/0 | {
"file_path": "text-generation-inference/integration-tests/models/__snapshots__/test_flash_llama_exl2/test_flash_llama_exl2_all_params.json",
"repo_id": "text-generation-inference",
"token_count": 978
} | 206 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.