text stringlengths 5 631k | id stringlengths 14 178 | metadata dict | __index_level_0__ int64 0 647 |
|---|---|---|---|
# Copyright 2025 The HuggingFace Inc. team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appl... | diffusers/src/diffusers/quantizers/auto.py/0 | {
"file_path": "diffusers/src/diffusers/quantizers/auto.py",
"repo_id": "diffusers",
"token_count": 2249
} | 187 |
# Copyright 2025 The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... | diffusers/src/diffusers/schedulers/__init__.py/0 | {
"file_path": "diffusers/src/diffusers/schedulers/__init__.py",
"repo_id": "diffusers",
"token_count": 4471
} | 188 |
# Copyright (c) 2022 Pablo Pernías MIT License
# Copyright 2025 UC Berkeley 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://... | diffusers/src/diffusers/schedulers/scheduling_ddpm_wuerstchen.py/0 | {
"file_path": "diffusers/src/diffusers/schedulers/scheduling_ddpm_wuerstchen.py",
"repo_id": "diffusers",
"token_count": 3646
} | 189 |
# Copyright 2025 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/schedulers/scheduling_unclip.py/0 | {
"file_path": "diffusers/src/diffusers/schedulers/scheduling_unclip.py",
"repo_id": "diffusers",
"token_count": 6284
} | 190 |
# This file is autogenerated by the command `make fix-copies`, do not edit.
from ..utils import DummyObject, requires_backends
class OnnxRuntimeModel(metaclass=DummyObject):
_backends = ["onnx"]
def __init__(self, *args, **kwargs):
requires_backends(self, ["onnx"])
@classmethod
def from_conf... | diffusers/src/diffusers/utils/dummy_onnx_objects.py/0 | {
"file_path": "diffusers/src/diffusers/utils/dummy_onnx_objects.py",
"repo_id": "diffusers",
"token_count": 202
} | 191 |
# Copyright 2025 The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... | diffusers/src/diffusers/utils/import_utils.py/0 | {
"file_path": "diffusers/src/diffusers/utils/import_utils.py",
"repo_id": "diffusers",
"token_count": 12599
} | 192 |
# coding=utf-8
# Copyright 2025 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/lora/test_lora_layers_sd.py/0 | {
"file_path": "diffusers/tests/lora/test_lora_layers_sd.py",
"repo_id": "diffusers",
"token_count": 14124
} | 193 |
# coding=utf-8
# Copyright 2025 HuggingFace Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | diffusers/tests/models/autoencoders/test_models_autoencoder_magvit.py/0 | {
"file_path": "diffusers/tests/models/autoencoders/test_models_autoencoder_magvit.py",
"repo_id": "diffusers",
"token_count": 1237
} | 194 |
# coding=utf-8
# Copyright 2025 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_dit_transformer2d.py/0 | {
"file_path": "diffusers/tests/models/transformers/test_models_dit_transformer2d.py",
"repo_id": "diffusers",
"token_count": 1438
} | 195 |
# Copyright 2025 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 agreed to in writ... | diffusers/tests/models/transformers/test_models_transformer_hunyuan_video.py/0 | {
"file_path": "diffusers/tests/models/transformers/test_models_transformer_hunyuan_video.py",
"repo_id": "diffusers",
"token_count": 5242
} | 196 |
# coding=utf-8
# Copyright 2025 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": 6484
} | 197 |
# coding=utf-8
# Copyright 2025 HuggingFace Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | diffusers/tests/others/test_config.py/0 | {
"file_path": "diffusers/tests/others/test_config.py",
"repo_id": "diffusers",
"token_count": 4259
} | 198 |
# coding=utf-8
# Copyright 2025 HuggingFace Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | diffusers/tests/pipelines/controlnet/test_flax_controlnet.py/0 | {
"file_path": "diffusers/tests/pipelines/controlnet/test_flax_controlnet.py",
"repo_id": "diffusers",
"token_count": 2109
} | 199 |
import gc
import unittest
import numpy as np
import torch
from huggingface_hub import hf_hub_download
from transformers import AutoTokenizer, CLIPTextConfig, CLIPTextModel, CLIPTokenizer, T5EncoderModel
from diffusers import (
AutoencoderKL,
FasterCacheConfig,
FlowMatchEulerDiscreteScheduler,
FluxPipe... | diffusers/tests/pipelines/flux/test_pipeline_flux.py/0 | {
"file_path": "diffusers/tests/pipelines/flux/test_pipeline_flux.py",
"repo_id": "diffusers",
"token_count": 6567
} | 200 |
# coding=utf-8
# Copyright 2025 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": 5572
} | 201 |
# coding=utf-8
# Copyright 2025 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": 5332
} | 202 |
import inspect
import unittest
import numpy as np
import torch
from transformers import AutoTokenizer, CLIPTextConfig, CLIPTextModelWithProjection, CLIPTokenizer, T5EncoderModel
from diffusers import (
AutoencoderKL,
FlowMatchEulerDiscreteScheduler,
SD3Transformer2DModel,
StableDiffusion3PAGPipeline,
... | diffusers/tests/pipelines/pag/test_pag_sd3.py/0 | {
"file_path": "diffusers/tests/pipelines/pag/test_pag_sd3.py",
"repo_id": "diffusers",
"token_count": 4730
} | 203 |
# Copyright 2025 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/qwenimage/test_qwenimage_edit.py/0 | {
"file_path": "diffusers/tests/pipelines/qwenimage/test_qwenimage_edit.py",
"repo_id": "diffusers",
"token_count": 4148
} | 204 |
# coding=utf-8
# Copyright 2025 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_image_variation/test_stable_diffusion_image_variation.py/0 | {
"file_path": "diffusers/tests/pipelines/stable_diffusion_image_variation/test_stable_diffusion_image_variation.py",
"repo_id": "diffusers",
"token_count": 6001
} | 205 |
import gc
import inspect
import json
import os
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.utils import is_jinja_available
from tr... | diffusers/tests/pipelines/test_pipelines_common.py/0 | {
"file_path": "diffusers/tests/pipelines/test_pipelines_common.py",
"repo_id": "diffusers",
"token_count": 57310
} | 206 |
# coding=utf-8
# Copyright 2025 The HuggingFace Team 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 clone of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... | diffusers/tests/quantization/bnb/test_4bit.py/0 | {
"file_path": "diffusers/tests/quantization/bnb/test_4bit.py",
"repo_id": "diffusers",
"token_count": 16303
} | 207 |
import torch
from diffusers import CMStochasticIterativeScheduler
from .test_schedulers import SchedulerCommonTest
class CMStochasticIterativeSchedulerTest(SchedulerCommonTest):
scheduler_classes = (CMStochasticIterativeScheduler,)
num_inference_steps = 10
def get_scheduler_config(self, **kwargs):
... | diffusers/tests/schedulers/test_scheduler_consistency_model.py/0 | {
"file_path": "diffusers/tests/schedulers/test_scheduler_consistency_model.py",
"repo_id": "diffusers",
"token_count": 3029
} | 208 |
# coding=utf-8
# Copyright 2025 HuggingFace Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | diffusers/tests/single_file/test_lumina2_transformer.py/0 | {
"file_path": "diffusers/tests/single_file/test_lumina2_transformer.py",
"repo_id": "diffusers",
"token_count": 1016
} | 209 |
import gc
import unittest
import pytest
import torch
from diffusers import (
StableDiffusionUpscalePipeline,
)
from diffusers.utils import load_image
from diffusers.utils.testing_utils import (
backend_empty_cache,
enable_full_determinism,
numpy_cosine_similarity_distance,
require_torch_accelerato... | diffusers/tests/single_file/test_stable_diffusion_upscale_single_file.py/0 | {
"file_path": "diffusers/tests/single_file/test_stable_diffusion_upscale_single_file.py",
"repo_id": "diffusers",
"token_count": 1323
} | 210 |
import argparse
import inspect
import sys
from pathlib import Path
from typing import List, Type
root_dir = Path(__file__).parent.parent.absolute()
sys.path.insert(0, str(root_dir))
parser = argparse.ArgumentParser()
parser.add_argument("--type", type=str, default=None)
args = parser.parse_args()
def get_test_meth... | diffusers/utils/extract_tests_from_mixin.py/0 | {
"file_path": "diffusers/utils/extract_tests_from_mixin.py",
"repo_id": "diffusers",
"token_count": 642
} | 211 |
# Copyright 2025 The HuggingFace Inc. team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appl... | lerobot/docker/Dockerfile.user/0 | {
"file_path": "lerobot/docker/Dockerfile.user",
"repo_id": "lerobot",
"token_count": 905
} | 212 |
# Koch v1.1
In the steps below, we explain how to assemble the Koch v1.1 robot.
## Order and assemble the parts
Follow the sourcing and assembling instructions provided in this [README](https://github.com/jess-moss/koch-v1-1). This will guide you through setting up both the follower and leader arms, as shown in the ... | lerobot/docs/source/koch.mdx/0 | {
"file_path": "lerobot/docs/source/koch.mdx",
"repo_id": "lerobot",
"token_count": 2924
} | 213 |
from lerobot.datasets.lerobot_dataset import LeRobotDataset
from lerobot.datasets.utils import hw_to_dataset_features
from lerobot.policies.act.modeling_act import ACTPolicy
from lerobot.record import record_loop
from lerobot.robots.lekiwi import LeKiwiClient, LeKiwiClientConfig
from lerobot.utils.control_utils import ... | lerobot/examples/lekiwi/evaluate.py/0 | {
"file_path": "lerobot/examples/lekiwi/evaluate.py",
"repo_id": "lerobot",
"token_count": 1146
} | 214 |
#!/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/src/lerobot/configs/default.py/0 | {
"file_path": "lerobot/src/lerobot/configs/default.py",
"repo_id": "lerobot",
"token_count": 1038
} | 215 |
#!/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/src/lerobot/datasets/transforms.py/0 | {
"file_path": "lerobot/src/lerobot/datasets/transforms.py",
"repo_id": "lerobot",
"token_count": 3925
} | 216 |
# Copyright 2025 The HuggingFace Inc. team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appl... | lerobot/src/lerobot/model/kinematics.py/0 | {
"file_path": "lerobot/src/lerobot/model/kinematics.py",
"repo_id": "lerobot",
"token_count": 1957
} | 217 |
#!/usr/bin/env python
# Copyright 2024 Tony Z. Zhao 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... | lerobot/src/lerobot/policies/act/configuration_act.py/0 | {
"file_path": "lerobot/src/lerobot/policies/act/configuration_act.py",
"repo_id": "lerobot",
"token_count": 3350
} | 218 |
#!/usr/bin/env python
# Copyright 2025 Physical Intelligence 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... | lerobot/src/lerobot/policies/pi0fast/modeling_pi0fast.py/0 | {
"file_path": "lerobot/src/lerobot/policies/pi0fast/modeling_pi0fast.py",
"repo_id": "lerobot",
"token_count": 18710
} | 219 |
#!/usr/bin/env python
# Copyright 2024 Seungjae Lee and Yibin Wang and Haritheja Etukuru
# and H. Jin Kim and Nur Muhammad Mahi Shafiullah and Lerrel Pinto
# and The HuggingFace Inc. team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in com... | lerobot/src/lerobot/policies/vqbet/modeling_vqbet.py/0 | {
"file_path": "lerobot/src/lerobot/policies/vqbet/modeling_vqbet.py",
"repo_id": "lerobot",
"token_count": 20389
} | 220 |
#!/usr/bin/env python
# Copyright 2025 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/src/lerobot/robots/hope_jr/config_hope_jr.py/0 | {
"file_path": "lerobot/src/lerobot/robots/hope_jr/config_hope_jr.py",
"repo_id": "lerobot",
"token_count": 554
} | 221 |
#!/usr/bin/env python
# Copyright 2025 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/src/lerobot/robots/so100_follower/config_so100_follower.py/0 | {
"file_path": "lerobot/src/lerobot/robots/so100_follower/config_so100_follower.py",
"repo_id": "lerobot",
"token_count": 882
} | 222 |
# Copyright 2024 The HuggingFace Inc. team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appl... | lerobot/src/lerobot/robots/viperx/viperx.py/0 | {
"file_path": "lerobot/src/lerobot/robots/viperx/viperx.py",
"repo_id": "lerobot",
"token_count": 4038
} | 223 |
#!/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/src/lerobot/scripts/visualize_dataset.py/0 | {
"file_path": "lerobot/src/lerobot/scripts/visualize_dataset.py",
"repo_id": "lerobot",
"token_count": 4084
} | 224 |
#!/usr/bin/env python
# Copyright 2025 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/src/lerobot/teleoperators/homunculus/homunculus_arm.py/0 | {
"file_path": "lerobot/src/lerobot/teleoperators/homunculus/homunculus_arm.py",
"repo_id": "lerobot",
"token_count": 5226
} | 225 |
# Copyright 2024 The HuggingFace Inc. team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appl... | lerobot/src/lerobot/utils/control_utils.py/0 | {
"file_path": "lerobot/src/lerobot/utils/control_utils.py",
"repo_id": "lerobot",
"token_count": 3060
} | 226 |
# Copyright 2025 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 agreed ... | lerobot/tests/async_inference/test_e2e.py/0 | {
"file_path": "lerobot/tests/async_inference/test_e2e.py",
"repo_id": "lerobot",
"token_count": 2189
} | 227 |
#!/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/datasets/test_visualize_dataset.py/0 | {
"file_path": "lerobot/tests/datasets/test_visualize_dataset.py",
"repo_id": "lerobot",
"token_count": 393
} | 228 |
#!/usr/bin/env python
# Copyright 2025 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/motors/test_motors_bus.py/0 | {
"file_path": "lerobot/tests/motors/test_motors_bus.py",
"repo_id": "lerobot",
"token_count": 5342
} | 229 |
#!/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_available.py/0 | {
"file_path": "lerobot/tests/test_available.py",
"repo_id": "lerobot",
"token_count": 766
} | 230 |
# coding=utf-8
# Copyright 2025 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... | open-r1/scripts/benchmark_e2b.py/0 | {
"file_path": "open-r1/scripts/benchmark_e2b.py",
"repo_id": "open-r1",
"token_count": 1377
} | 231 |
#!/bin/bash
#SBATCH --ntasks-per-node=1
#SBATCH --gres=gpu:8
#SBATCH --partition=hopper-prod
#SBATCH --output=./logs/%x-%j.out
#SBATCH --error=./logs/%x-%j.err
#SBATCH --requeue
#SBATCH --time=1-00:00:00
# Specific configuration optimized for the Hugging Face Compute Cluster
# Be ye warned this may not work on other ... | open-r1/slurm/evaluate.slurm/0 | {
"file_path": "open-r1/slurm/evaluate.slurm",
"repo_id": "open-r1",
"token_count": 1321
} | 232 |
from .data import get_dataset
from .import_utils import is_e2b_available, is_morph_available
from .model_utils import get_model, get_tokenizer
__all__ = ["get_tokenizer", "is_e2b_available", "is_morph_available", "get_model", "get_dataset"]
| open-r1/src/open_r1/utils/__init__.py/0 | {
"file_path": "open-r1/src/open_r1/utils/__init__.py",
"repo_id": "open-r1",
"token_count": 85
} | 233 |
# coding=utf-8
# Copyright 2025 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... | open-r1/src/open_r1/utils/routed_morph.py/0 | {
"file_path": "open-r1/src/open_r1/utils/routed_morph.py",
"repo_id": "open-r1",
"token_count": 1779
} | 234 |
<!---
Copyright 2023 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or ... | peft/docs/README.md/0 | {
"file_path": "peft/docs/README.md",
"repo_id": "peft",
"token_count": 2889
} | 235 |
<!--Copyright 2023 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed... | peft/docs/source/developer_guides/quantization.md/0 | {
"file_path": "peft/docs/source/developer_guides/quantization.md",
"repo_id": "peft",
"token_count": 4220
} | 236 |
<!--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/examples/boft_controlnet/boft_controlnet.md/0 | {
"file_path": "peft/examples/boft_controlnet/boft_controlnet.md",
"repo_id": "peft",
"token_count": 2427
} | 237 |
<jupyter_start><jupyter_code>from transformers import AutoModelForCausalLM
from peft import get_peft_config, get_peft_model, PrefixTuningConfig, TaskType, PeftType
import torch
from datasets import load_dataset
import os
from transformers import AutoTokenizer
from torch.utils.data import DataLoader
from transformers im... | peft/examples/causal_language_modeling/peft_prefix_tuning_clm.ipynb/0 | {
"file_path": "peft/examples/causal_language_modeling/peft_prefix_tuning_clm.ipynb",
"repo_id": "peft",
"token_count": 4824
} | 238 |
# 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/examples/corda_finetuning/datautils.py/0 | {
"file_path": "peft/examples/corda_finetuning/datautils.py",
"repo_id": "peft",
"token_count": 4106
} | 239 |
<jupyter_start><jupyter_text>Fine-tune large models using 🤗 `peft` adapters, `transformers` & `bitsandbytes`In this tutorial we will cover how we can fine-tune large language models using the very recent `peft` library and `bitsandbytes` for loading large models in 8-bit.The fine-tuning method will rely on a recent me... | peft/examples/int8_training/Finetune_opt_bnb_peft.ipynb/0 | {
"file_path": "peft/examples/int8_training/Finetune_opt_bnb_peft.ipynb",
"repo_id": "peft",
"token_count": 2830
} | 240 |
# 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": 938
} | 241 |
<jupyter_start><jupyter_code>import argparse
import os
import torch
from torch.optim import AdamW
from torch.utils.data import DataLoader
from peft import (
get_peft_config,
get_peft_model,
get_peft_model_state_dict,
set_peft_model_state_dict,
LoraConfig,
PeftType,
PrefixTuningConfig,
P... | peft/examples/sequence_classification/LoRA.ipynb/0 | {
"file_path": "peft/examples/sequence_classification/LoRA.ipynb",
"repo_id": "peft",
"token_count": 2317
} | 242 |
python train.py \
--seed 100 \
--model_name_or_path "mistralai/Mistral-7B-v0.1" \
--dataset_name "smangrul/ultrachat-10k-chatml" \
--chat_template_format "chatml" \
--add_special_tokens False \
--append_concat_token False \
--splits "train,test" \
--max_seq_len 2048 \
--num_train_epochs 1 \
--logging_steps 5 \
--log_le... | peft/examples/sft/run_peft.sh/0 | {
"file_path": "peft/examples/sft/run_peft.sh",
"repo_id": "peft",
"token_count": 457
} | 243 |
<jupyter_start><jupyter_text>IntroductionIn this notebook, we are going to fine-tune the LayoutLM model by Microsoft Research on the [FUNSD](https://guillaumejaume.github.io/FUNSD/) dataset, which is a collection of annotated form documents. The goal of our model is to learn the annotations of a number of labels ("ques... | peft/examples/token_classification/peft_lora_token_cls.ipynb/0 | {
"file_path": "peft/examples/token_classification/peft_lora_token_cls.ipynb",
"repo_id": "peft",
"token_count": 12369
} | 244 |
{
"optimizer_kwargs": {
"lr": 3e-1,
"weight_decay": 1e-5
}
}
| peft/method_comparison/MetaMathQA/experiments/c3a/llama-3.2-3B-default/training_params.json/0 | {
"file_path": "peft/method_comparison/MetaMathQA/experiments/c3a/llama-3.2-3B-default/training_params.json",
"repo_id": "peft",
"token_count": 43
} | 245 |
{
"alpha_pattern": {},
"auto_mapping": null,
"base_model_name_or_path": null,
"bias": "none",
"block_share": false,
"coft": false,
"eps": 6e-05,
"exclude_modules": null,
"fan_in_fan_out": false,
"inference_mode": false,
"init_weights": true,
"layers_pattern": null,
"layers_to_transform": null,... | peft/method_comparison/MetaMathQA/experiments/oft/llama-3.2-3B-rank32/adapter_config.json/0 | {
"file_path": "peft/method_comparison/MetaMathQA/experiments/oft/llama-3.2-3B-rank32/adapter_config.json",
"repo_id": "peft",
"token_count": 246
} | 246 |
# Copyright 2025-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/method_comparison/MetaMathQA/run.py/0 | {
"file_path": "peft/method_comparison/MetaMathQA/run.py",
"repo_id": "peft",
"token_count": 8105
} | 247 |
# 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/config.py/0 | {
"file_path": "peft/src/peft/config.py",
"repo_id": "peft",
"token_count": 5959
} | 248 |
# 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/gptq.py/0 | {
"file_path": "peft/src/peft/tuners/adalora/gptq.py",
"repo_id": "peft",
"token_count": 1154
} | 249 |
# 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/bone/config.py/0 | {
"file_path": "peft/src/peft/tuners/bone/config.py",
"repo_id": "peft",
"token_count": 2324
} | 250 |
# 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/hra/config.py/0 | {
"file_path": "peft/src/peft/tuners/hra/config.py",
"repo_id": "peft",
"token_count": 2474
} | 251 |
# 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/layer.py/0 | {
"file_path": "peft/src/peft/tuners/lora/layer.py",
"repo_id": "peft",
"token_count": 45998
} | 252 |
# Copyright 2025-present the HuggingFace Inc. team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | peft/src/peft/tuners/oft/aqlm.py/0 | {
"file_path": "peft/src/peft/tuners/oft/aqlm.py",
"repo_id": "peft",
"token_count": 1432
} | 253 |
# 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/poly/model.py/0 | {
"file_path": "peft/src/peft/tuners/poly/model.py",
"repo_id": "peft",
"token_count": 2932
} | 254 |
# Copyright 2025-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/road/layer.py/0 | {
"file_path": "peft/src/peft/tuners/road/layer.py",
"repo_id": "peft",
"token_count": 7689
} | 255 |
# 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/utils/merge_utils.py/0 | {
"file_path": "peft/src/peft/utils/merge_utils.py",
"repo_id": "peft",
"token_count": 3817
} | 256 |
# 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_cpt.py/0 | {
"file_path": "peft/tests/test_cpt.py",
"repo_id": "peft",
"token_count": 5033
} | 257 |
#!/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_low_level_api.py/0 | {
"file_path": "peft/tests/test_low_level_api.py",
"repo_id": "peft",
"token_count": 7590
} | 258 |
# 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_vision_models.py/0 | {
"file_path": "peft/tests/test_vision_models.py",
"repo_id": "peft",
"token_count": 2432
} | 259 |
# PyTorch Image Models
- [What's New](#whats-new)
- [Introduction](#introduction)
- [Models](#models)
- [Features](#features)
- [Results](#results)
- [Getting Started (Documentation)](#getting-started-documentation)
- [Train, Validation, Inference Scripts](#train-validation-inference-scripts)
- [Awesome PyTorch Resourc... | pytorch-image-models/README.md/0 | {
"file_path": "pytorch-image-models/README.md",
"repo_id": "pytorch-image-models",
"token_count": 25068
} | 260 |
# Model Summaries
The model architectures included come from a wide variety of sources. Sources, including papers, original impl ("reference code") that I rewrote / adapted, and PyTorch impl that I leveraged directly ("code") are listed below.
Most included models have pretrained weights. The weights are either:
1. ... | pytorch-image-models/hfdocs/source/models.mdx/0 | {
"file_path": "pytorch-image-models/hfdocs/source/models.mdx",
"repo_id": "pytorch-image-models",
"token_count": 4501
} | 261 |
# MobileNet v2
**MobileNetV2** is a convolutional neural network architecture that seeks to perform well on mobile devices. It is based on an [inverted residual structure](https://paperswithcode.com/method/inverted-residual-block) where the residual connections are between the bottleneck layers. The intermediate expa... | pytorch-image-models/hfdocs/source/models/mobilenet-v2.mdx/0 | {
"file_path": "pytorch-image-models/hfdocs/source/models/mobilenet-v2.mdx",
"repo_id": "pytorch-image-models",
"token_count": 3404
} | 262 |
# Quickstart
This quickstart is intended for developers who are ready to dive into the code and see an example of how to integrate `timm` into their model training workflow.
First, you'll need to install `timm`. For more information on installation, see [Installation](installation).
```bash
pip install timm
```
## ... | pytorch-image-models/hfdocs/source/quickstart.mdx/0 | {
"file_path": "pytorch-image-models/hfdocs/source/quickstart.mdx",
"repo_id": "pytorch-image-models",
"token_count": 2581
} | 263 |
"""Variable‑size Mixup / CutMix utilities for NaFlex data loaders.
This module provides:
* `mix_batch_variable_size` – pixel‑level Mixup/CutMix that operates on a
list of images whose spatial sizes differ, mixing only their central overlap
so no resizing is required.
* `pairwise_mixup_target` – builds soft‑label ... | pytorch-image-models/timm/data/naflex_mixup.py/0 | {
"file_path": "pytorch-image-models/timm/data/naflex_mixup.py",
"repo_id": "pytorch-image-models",
"token_count": 4066
} | 264 |
from multiprocessing import Value
class SharedCount:
def __init__(self, epoch: int = 0):
self.shared_epoch = Value('i', epoch)
@property
def value(self):
return self.shared_epoch.value
@value.setter
def value(self, epoch):
self.shared_epoch.value = epoch
| pytorch-image-models/timm/data/readers/shared_count.py/0 | {
"file_path": "pytorch-image-models/timm/data/readers/shared_count.py",
"repo_id": "pytorch-image-models",
"token_count": 122
} | 265 |
""" CBAM (sort-of) Attention
Experimental impl of CBAM: Convolutional Block Attention Module: https://arxiv.org/abs/1807.06521
WARNING: Results with these attention layers have been mixed. They can significantly reduce performance on
some tasks, especially fine-grained it seems. I may end up removing this impl.
Hack... | pytorch-image-models/timm/layers/cbam.py/0 | {
"file_path": "pytorch-image-models/timm/layers/cbam.py",
"repo_id": "pytorch-image-models",
"token_count": 2016
} | 266 |
from enum import Enum
from typing import Union
import torch
class Format(str, Enum):
NCHW = 'NCHW'
NHWC = 'NHWC'
NCL = 'NCL'
NLC = 'NLC'
FormatT = Union[str, Format]
def get_spatial_dim(fmt: FormatT):
fmt = Format(fmt)
if fmt is Format.NLC:
dim = (1,)
elif fmt is Format.NCL:
... | pytorch-image-models/timm/layers/format.py/0 | {
"file_path": "pytorch-image-models/timm/layers/format.py",
"repo_id": "pytorch-image-models",
"token_count": 572
} | 267 |
""" MLP module w/ dropout and configurable activation layer
Hacked together by / Copyright 2020 Ross Wightman
"""
from functools import partial
from torch import nn as nn
from .grn import GlobalResponseNorm
from .helpers import to_2tuple
class Mlp(nn.Module):
""" MLP as used in Vision Transformer, MLP-Mixer an... | pytorch-image-models/timm/layers/mlp.py/0 | {
"file_path": "pytorch-image-models/timm/layers/mlp.py",
"repo_id": "pytorch-image-models",
"token_count": 4398
} | 268 |
""" Split BatchNorm
A PyTorch BatchNorm layer that splits input batch into N equal parts and passes each through
a separate BN layer. The first split is passed through the parent BN layers with weight/bias
keys the same as the original BN. All other splits pass through BN sub-layers under the '.aux_bn'
namespace.
Thi... | pytorch-image-models/timm/layers/split_batchnorm.py/0 | {
"file_path": "pytorch-image-models/timm/layers/split_batchnorm.py",
"repo_id": "pytorch-image-models",
"token_count": 1394
} | 269 |
import os
from pathlib import Path
from typing import Any, Dict, Optional, Tuple, Union
from urllib.parse import urlsplit
from torch import nn
from timm.layers import set_layer_config
from ._helpers import load_checkpoint
from ._hub import load_model_config_from_hf, load_model_config_from_path
from ._pretrained impor... | pytorch-image-models/timm/models/_factory.py/0 | {
"file_path": "pytorch-image-models/timm/models/_factory.py",
"repo_id": "pytorch-image-models",
"token_count": 2427
} | 270 |
""" Bring-Your-Own-Blocks Network
A flexible network w/ dataclass based config for stacking those NN blocks.
This model is currently used to implement the following networks:
GPU Efficient (ResNets) - gernet_l/m/s (original versions called genet, but this was already used (by SENet author)).
Paper: `Neural Architect... | pytorch-image-models/timm/models/byobnet.py/0 | {
"file_path": "pytorch-image-models/timm/models/byobnet.py",
"repo_id": "pytorch-image-models",
"token_count": 55216
} | 271 |
""" The EfficientNet Family in PyTorch
An implementation of EfficienNet that covers variety of related models with efficient architectures:
* EfficientNet-V2
- `EfficientNetV2: Smaller Models and Faster Training` - https://arxiv.org/abs/2104.00298
* EfficientNet (B0-B8, L2 + Tensorflow pretrained AutoAug/RandAug/A... | pytorch-image-models/timm/models/efficientnet.py/0 | {
"file_path": "pytorch-image-models/timm/models/efficientnet.py",
"repo_id": "pytorch-image-models",
"token_count": 59231
} | 272 |
import math
from copy import deepcopy
from functools import partial
from typing import Dict, List, Optional, Tuple, Union
import torch
import torch.nn as nn
import torch.nn.functional as F
from timm.data import IMAGENET_DEFAULT_MEAN, IMAGENET_DEFAULT_STD
from timm.layers import PatchEmbed, Mlp, DropPath, ClNormMlpCla... | pytorch-image-models/timm/models/hieradet_sam2.py/0 | {
"file_path": "pytorch-image-models/timm/models/hieradet_sam2.py",
"repo_id": "pytorch-image-models",
"token_count": 11986
} | 273 |
""" Multi-Scale Vision Transformer v2
@inproceedings{li2021improved,
title={MViTv2: Improved multiscale vision transformers for classification and detection},
author={Li, Yanghao and Wu, Chao-Yuan and Fan, Haoqi and Mangalam, Karttikeya and Xiong, Bo and Malik, Jitendra and Feichtenhofer, Christoph},
booktitle={... | pytorch-image-models/timm/models/mvitv2.py/0 | {
"file_path": "pytorch-image-models/timm/models/mvitv2.py",
"repo_id": "pytorch-image-models",
"token_count": 21308
} | 274 |
"""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": 47348
} | 275 |
""" Twins
A PyTorch impl of : `Twins: Revisiting the Design of Spatial Attention in Vision Transformers`
- https://arxiv.org/pdf/2104.13840.pdf
Code/weights from https://github.com/Meituan-AutoML/Twins, original copyright/license info below
"""
# --------------------------------------------------------
# Twins
# ... | pytorch-image-models/timm/models/twins.py/0 | {
"file_path": "pytorch-image-models/timm/models/twins.py",
"repo_id": "pytorch-image-models",
"token_count": 11134
} | 276 |
from typing import Any, Dict, Iterable, Union, Protocol, Type
try:
from typing import TypeAlias, TypeVar
except ImportError:
from typing_extensions import TypeAlias, TypeVar
import torch
import torch.optim
try:
from torch.optim.optimizer import ParamsT
except (ImportError, TypeError):
ParamsT: TypeAli... | pytorch-image-models/timm/optim/_types.py/0 | {
"file_path": "pytorch-image-models/timm/optim/_types.py",
"repo_id": "pytorch-image-models",
"token_count": 217
} | 277 |
""" PyTorch MARS Optimizer
Code simplified from https://github.com/AGI-Arena/MARS
Paper: MARS: Unleashing the Power of Variance Reduction for Training Large Models - https://arxiv.org/abs/2411.10438
@article{yuan2024mars,
title={MARS: Unleashing the Power of Variance Reduction for Training Large Models},
author=... | pytorch-image-models/timm/optim/mars.py/0 | {
"file_path": "pytorch-image-models/timm/optim/mars.py",
"repo_id": "pytorch-image-models",
"token_count": 3950
} | 278 |
""" Scheduler Factory
Hacked together by / Copyright 2021 Ross Wightman
"""
from typing import List, Optional, Union
from torch.optim import Optimizer
from .cosine_lr import CosineLRScheduler
from .multistep_lr import MultiStepLRScheduler
from .plateau_lr import PlateauLRScheduler
from .poly_lr import PolyLRScheduler... | pytorch-image-models/timm/scheduler/scheduler_factory.py/0 | {
"file_path": "pytorch-image-models/timm/scheduler/scheduler_factory.py",
"repo_id": "pytorch-image-models",
"token_count": 3536
} | 279 |
""" Exponential Moving Average (EMA) of model updates
Hacked together by / Copyright 2020 Ross Wightman
"""
import logging
from collections import OrderedDict
from copy import deepcopy
from typing import Optional
import torch
import torch.nn as nn
_logger = logging.getLogger(__name__)
class ModelEma:
""" Model... | pytorch-image-models/timm/utils/model_ema.py/0 | {
"file_path": "pytorch-image-models/timm/utils/model_ema.py",
"repo_id": "pytorch-image-models",
"token_count": 4614
} | 280 |
# Web Browser Automation with Agents 🤖🌐
[[open-in-colab]]
In this notebook, we'll create an **agent-powered web browser automation system**! This system can navigate websites, interact with elements, and extract information automatically.
The agent will be able to:
- [x] Navigate to web pages
- [x] Click on eleme... | smolagents/docs/source/en/examples/web_browser.md/0 | {
"file_path": "smolagents/docs/source/en/examples/web_browser.md",
"repo_id": "smolagents",
"token_count": 2146
} | 281 |
# मल्टी-स्टेप एजेंट्स कैसे काम करते हैं?
ReAct फ्रेमवर्क ([Yao et al., 2022](https://huggingface.co/papers/2210.03629)) वर्तमान में एजेंट्स बनाने का मुख्य दृष्टिकोण है।
नाम दो शब्दों, "Reason" (तर्क) और "Act" (क्रिया) के संयोजन पर आधारित है। वास्तव में, इस आर्किटेक्चर का पालन करने वाले एजेंट अपने कार्य को उतने चरणों ... | smolagents/docs/source/hi/conceptual_guides/react.md/0 | {
"file_path": "smolagents/docs/source/hi/conceptual_guides/react.md",
"repo_id": "smolagents",
"token_count": 1595
} | 282 |
# `smolagents`[[smolagents]]
<div class="flex justify-center">
<img src="https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/smolagents/license_to_call.png" style="max-width:700px"/>
</div>
## smolagents란 무엇인가요?[[what-is-smolagents]]
`smolagents`는 단 몇 줄의 코드만으로 에이전트를 구축하고 실행할 수 있도록 설계된 오... | smolagents/docs/source/ko/index.md/0 | {
"file_path": "smolagents/docs/source/ko/index.md",
"repo_id": "smolagents",
"token_count": 4409
} | 283 |
# 📚 管理Agent的记忆
[[open-in-colab]]
归根结底,Agent可以定义为由几个简单组件构成:它拥有工具、提示词。最重要的是,它具备对过往步骤的记忆,能够追溯完整的规划、执行和错误历史。
### 回放Agent的记忆
我们提供了多项功能来审查Agent的过往运行记录。
您可以通过插装(instrumentation)在可视化界面中查看Agent的运行过程,该界面支持对特定步骤进行缩放操作,具体方法参见[插装指南](./inspect_runs)。
您也可以使用`agent.replay()`方法实现回放:
当Agent完成运行后:
```py
from smolagents import Inf... | smolagents/docs/source/zh/tutorials/memory.md/0 | {
"file_path": "smolagents/docs/source/zh/tutorials/memory.md",
"repo_id": "smolagents",
"token_count": 2218
} | 284 |
import argparse
import os
import threading
from dotenv import load_dotenv
from huggingface_hub import login
from scripts.text_inspector_tool import TextInspectorTool
from scripts.text_web_browser import (
ArchiveSearchTool,
FinderTool,
FindNextTool,
PageDownTool,
PageUpTool,
SimpleTextBrowser,
... | smolagents/examples/open_deep_research/run.py/0 | {
"file_path": "smolagents/examples/open_deep_research/run.py",
"repo_id": "smolagents",
"token_count": 1465
} | 285 |
# Smolagents Chat Server Demo
This is a simple web server that provides a chat interface for interacting with an AI code agent powered by `smolagents` and the Qwen2.5-Coder-32B-Instruct model, enhanced with MCP (Model Control Protocol) tools.
## Features
- Web-based chat interface
- AI code agent powered by Qwen2.5-... | smolagents/examples/server/README.md/0 | {
"file_path": "smolagents/examples/server/README.md",
"repo_id": "smolagents",
"token_count": 753
} | 286 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.