text
stringlengths
5
424k
id
stringlengths
13
178
metadata
dict
__index_level_0__
int64
0
672
#!/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/teleoperators/phone/teleop_phone.py/0
{ "file_path": "lerobot/src/lerobot/teleoperators/phone/teleop_phone.py", "repo_id": "lerobot", "token_count": 6547 }
210
#!/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/utils/rotation.py/0
{ "file_path": "lerobot/src/lerobot/utils/rotation.py", "repo_id": "lerobot", "token_count": 4440 }
211
version https://git-lfs.github.com/spec/v1 oid sha256:bb65a25e989a32a8b6258d368bd077e4548379c74ab5ada01cc532d658670df0 size 3687117
lerobot/tests/artifacts/datasets/lerobot/aloha_sim_insertion_human/frame_499.safetensors/0
{ "file_path": "lerobot/tests/artifacts/datasets/lerobot/aloha_sim_insertion_human/frame_499.safetensors", "repo_id": "lerobot", "token_count": 65 }
212
version https://git-lfs.github.com/spec/v1 oid sha256:9d4ebab73eabddc58879a4e770289d19e00a1a4cf2fa5fa33cd3a3246992bc90 size 40551392
lerobot/tests/artifacts/image_transforms/single_transforms.safetensors/0
{ "file_path": "lerobot/tests/artifacts/image_transforms/single_transforms.safetensors", "repo_id": "lerobot", "token_count": 68 }
213
version https://git-lfs.github.com/spec/v1 oid sha256:22a1031a2acfc36a455bff73ffbe097cfeb7742b6485e7422507e78d7a682703 size 164
lerobot/tests/artifacts/policies/xarm_lift_medium_tdmpc_use_mpc/output_dict.safetensors/0
{ "file_path": "lerobot/tests/artifacts/policies/xarm_lift_medium_tdmpc_use_mpc/output_dict.safetensors", "repo_id": "lerobot", "token_count": 63 }
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/tests/datasets/test_compute_stats.py/0
{ "file_path": "lerobot/tests/datasets/test_compute_stats.py", "repo_id": "lerobot", "token_count": 5023 }
215
#!/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/mocks/mock_dynamixel.py/0
{ "file_path": "lerobot/tests/mocks/mock_dynamixel.py", "repo_id": "lerobot", "token_count": 11311 }
216
#!/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/processor/test_act_processor.py/0
{ "file_path": "lerobot/tests/processor/test_act_processor.py", "repo_id": "lerobot", "token_count": 5203 }
217
#!/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/processor/test_smolvla_processor.py/0
{ "file_path": "lerobot/tests/processor/test_smolvla_processor.py", "repo_id": "lerobot", "token_count": 5858 }
218
# 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/tests/utils/test_io_utils.py/0
{ "file_path": "lerobot/tests/utils/test_io_utils.py", "repo_id": "lerobot", "token_count": 1063 }
219
# Model arguments model_name_or_path: Qwen/Qwen2.5-Coder-7B-Instruct model_revision: main torch_dtype: bfloat16 attn_implementation: flash_attention_2 # Data training arguments dataset_name: open-r1/codeforces dataset_prompt_column: prompt dataset_config: verifiable-prompts dataset_test_split: test dataset_train_split:...
open-r1/recipes/Qwen2.5-Coder-7B-Instruct/grpo/config_codeforces.yaml/0
{ "file_path": "open-r1/recipes/Qwen2.5-Coder-7B-Instruct/grpo/config_codeforces.yaml", "repo_id": "open-r1", "token_count": 926 }
220
# 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...
open-r1/scripts/pass_rate_filtering/compute_pass_rate.py/0
{ "file_path": "open-r1/scripts/pass_rate_filtering/compute_pass_rate.py", "repo_id": "open-r1", "token_count": 3331 }
221
#!/bin/bash #SBATCH --job-name=r1-server #SBATCH --partition=hopper-prod #SBATCH --qos=normal #SBATCH --nodes=2 #SBATCH --gpus-per-node=8 #SBATCH --exclusive #SBATCH --output=./logs/%x_%j_%n.out #SBATCH --error=./logs/%x_%j_%n.err #SBATCH --time=7-00:00:00 #SBATCH --ntasks-per-node=1 set -exuo pipefail MODEL_PATH="de...
open-r1/slurm/serve_r1.slurm/0
{ "file_path": "open-r1/slurm/serve_r1.slurm", "repo_id": "open-r1", "token_count": 1544 }
222
from collections import defaultdict from functools import lru_cache from datasets import load_dataset def add_includes(code: str, problem_id: str) -> str: """ Fix common compilation errors for IOI problems. """ if not code: return code # has most of the useful functions code_header = ...
open-r1/src/open_r1/utils/competitive_programming/ioi_utils.py/0
{ "file_path": "open-r1/src/open_r1/utils/competitive_programming/ioi_utils.py", "repo_id": "open-r1", "token_count": 520 }
223
<!--- Copyright 2023 The HuggingFace Team. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or ...
peft/README.md/0
{ "file_path": "peft/README.md", "repo_id": "peft", "token_count": 3732 }
224
<!--Copyright 2024 The HuggingFace Team. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed...
peft/docs/source/developer_guides/checkpoint.md/0
{ "file_path": "peft/docs/source/developer_guides/checkpoint.md", "repo_id": "peft", "token_count": 4146 }
225
# 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/boft_controlnet/test_controlnet.py/0
{ "file_path": "peft/examples/boft_controlnet/test_controlnet.py", "repo_id": "peft", "token_count": 1827 }
226
#!/usr/bin/env python # 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 require...
peft/examples/boft_dreambooth/train_dreambooth.py/0
{ "file_path": "peft/examples/boft_dreambooth/train_dreambooth.py", "repo_id": "peft", "token_count": 12892 }
227
<jupyter_start><jupyter_code>import torch from datasets import load_dataset from transformers import set_seed, AutoModelForSeq2SeqLM, AutoTokenizer from peft import get_peft_model, MultitaskPromptTuningConfig, TaskType, MultitaskPromptTuningInit set_seed(42) device = torch.accelerator.current_accelerator().type if has...
peft/examples/conditional_generation/multitask_prompt_tuning.ipynb/0
{ "file_path": "peft/examples/conditional_generation/multitask_prompt_tuning.ipynb", "repo_id": "peft", "token_count": 3398 }
228
<jupyter_start><jupyter_text>PEFT with DNA Language Models This notebook demonstrates how to utilize parameter-efficient fine-tuning techniques (PEFT) from the PEFT library to fine-tune a DNA Language Model (DNA-LM). The fine-tuned DNA-LM will be applied to solve a task from the nucleotide benchmark dataset. Parameter-...
peft/examples/dna_language_models/dna_lm.ipynb/0
{ "file_path": "peft/examples/dna_language_models/dna_lm.ipynb", "repo_id": "peft", "token_count": 3835 }
229
<jupyter_start><jupyter_code>import os from PIL import Image import torch from accelerate.logging import get_logger from diffusers import StableDiffusionPipeline from diffusers.utils import check_min_version from peft import PeftModel # Will error if the minimal version of diffusers is not installed. Remove at your...
peft/examples/hra_dreambooth/dreambooth_inference.ipynb/0
{ "file_path": "peft/examples/hra_dreambooth/dreambooth_inference.ipynb", "repo_id": "peft", "token_count": 1150 }
230
<jupyter_start><jupyter_text>Finetuning Whisper-large-V2 on Colab using PEFT-Lora + BNB INT8 training In this Colab, we present a step-by-step guide on how to fine-tune Whisper for any multilingual ASR dataset using Hugging Face 🤗 Transformers and 🤗 PEFT. Using 🤗 PEFT and `bitsandbytes`, you can train the `whisper-l...
peft/examples/int8_training/peft_bnb_whisper_large_v2_training.ipynb/0
{ "file_path": "peft/examples/int8_training/peft_bnb_whisper_large_v2_training.ipynb", "repo_id": "peft", "token_count": 7766 }
231
# 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/examples/miss_finetuning/miss_finetuning.py/0
{ "file_path": "peft/examples/miss_finetuning/miss_finetuning.py", "repo_id": "peft", "token_count": 1540 }
232
# RandLora: Full-rank parameter-efficient fine-tuning of large models ## Introduction [RandLora](https://huggingface.co/papers/2502.00987) is a parameter-efficient fine-tuning technique that is similar to LoRA and VeRA but performs full rank updates to improve performance. RandLora can be particulary usefull when ada...
peft/examples/randlora_finetuning/README.md/0
{ "file_path": "peft/examples/randlora_finetuning/README.md", "repo_id": "peft", "token_count": 1887 }
233
<jupyter_start><jupyter_text>Using VeRA for sequence classification In this example, we fine-tune Roberta on a sequence classification task using VeRA. Imports<jupyter_code>import torch from torch.optim import AdamW from torch.utils.data import DataLoader from peft import ( get_peft_model, VeraConfig, Peft...
peft/examples/sequence_classification/VeRA.ipynb/0
{ "file_path": "peft/examples/sequence_classification/VeRA.ipynb", "repo_id": "peft", "token_count": 2571 }
234
# Makefile for running MetaMathQA experiments. # --- Configuration --- PYTHON := python RUN_SCRIPT := run.py EXPERIMENTS_DIR := experiments RESULTS_DIR := results # --- Automatic Experiment and Result Discovery --- # 1. Find all experiment directories by looking for adapter_config.json files. # This gives us a li...
peft/method_comparison/MetaMathQA/Makefile/0
{ "file_path": "peft/method_comparison/MetaMathQA/Makefile", "repo_id": "peft", "token_count": 1187 }
235
{ "auto_mapping": null, "base_model_name_or_path": null, "exclude_modules": null, "fan_in_fan_out": false, "feedforward_modules": null, "inference_mode": false, "init_ia3_weights": true, "modules_to_save": null, "peft_type": "IA3", "revision": null, "target_modules": null, "task_type": null }
peft/method_comparison/MetaMathQA/experiments/ia3/llama-3.2-3B-default/adapter_config.json/0
{ "file_path": "peft/method_comparison/MetaMathQA/experiments/ia3/llama-3.2-3B-default/adapter_config.json", "repo_id": "peft", "token_count": 131 }
236
{ "auto_mapping": null, "base_model_name_or_path": null, "encoder_hidden_size": 3072, "inference_mode": false, "num_attention_heads": 24, "num_layers": 28, "num_transformer_submodules": 1, "num_virtual_tokens": 200, "peft_type": "PREFIX_TUNING", "prefix_projection": false, "revision": null, "tas...
peft/method_comparison/MetaMathQA/experiments/prefixtuning/llama-3.2-3B-lr_0.001/adapter_config.json/0
{ "file_path": "peft/method_comparison/MetaMathQA/experiments/prefixtuning/llama-3.2-3B-lr_0.001/adapter_config.json", "repo_id": "peft", "token_count": 157 }
237
{ "model_id": "meta-llama/Llama-3.2-3B", "dtype": "float16", "seed": 42, "num_inference_runs": 10, "max_new_tokens": 20, "category_generation_params": { "short": {"max_new_tokens": 20}, "medium": {"max_new_tokens": 50}, "long": {"max_new_tokens": 100} } }
peft/method_comparison/text_generation_benchmark/default_benchmark_params.json/0
{ "file_path": "peft/method_comparison/text_generation_benchmark/default_benchmark_params.json", "repo_id": "peft", "token_count": 163 }
238
# 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/__init__.py/0
{ "file_path": "peft/src/peft/__init__.py", "repo_id": "peft", "token_count": 2490 }
239
# 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/__init__.py/0
{ "file_path": "peft/src/peft/tuners/adalora/__init__.py", "repo_id": "peft", "token_count": 498 }
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/src/peft/tuners/boft/layer.py/0
{ "file_path": "peft/src/peft/tuners/boft/layer.py", "repo_id": "peft", "token_count": 20314 }
241
# 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/fourierft/layer.py/0
{ "file_path": "peft/src/peft/tuners/fourierft/layer.py", "repo_id": "peft", "token_count": 3696 }
242
# 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/loha/config.py/0
{ "file_path": "peft/src/peft/tuners/loha/config.py", "repo_id": "peft", "token_count": 2743 }
243
# 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/lora/eva.py/0
{ "file_path": "peft/src/peft/tuners/lora/eva.py", "repo_id": "peft", "token_count": 13577 }
244
# Copyright 2023-present the HuggingFace Inc. team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
peft/src/peft/tuners/p_tuning/model.py/0
{ "file_path": "peft/src/peft/tuners/p_tuning/model.py", "repo_id": "peft", "token_count": 2476 }
245
# 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/randlora/model.py/0
{ "file_path": "peft/src/peft/tuners/randlora/model.py", "repo_id": "peft", "token_count": 6741 }
246
# 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/hotswap.py/0
{ "file_path": "peft/src/peft/utils/hotswap.py", "repo_id": "peft", "token_count": 10563 }
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/tests/test_auto.py/0
{ "file_path": "peft/tests/test_auto.py", "repo_id": "peft", "token_count": 4124 }
248
# 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_integrations.py/0
{ "file_path": "peft/tests/test_integrations.py", "repo_id": "peft", "token_count": 1367 }
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/tests/test_torch_compile.py/0
{ "file_path": "peft/tests/test_torch_compile.py", "repo_id": "peft", "token_count": 11218 }
250
*This guideline is very much a work-in-progress.* Contributions to `timm` for code, documentation, tests are more than welcome! There haven't been any formal guidelines to date so please bear with me, and feel free to add to this guide. # Coding style Code linting and auto-format (black) are not currently in place ...
pytorch-image-models/CONTRIBUTING.md/0
{ "file_path": "pytorch-image-models/CONTRIBUTING.md", "repo_id": "pytorch-image-models", "token_count": 1502 }
251
# Sharing and Loading Models From the Hugging Face Hub The `timm` library has a built-in integration with the Hugging Face Hub, making it easy to share and load models from the 🤗 Hub. In this short guide, we'll see how to: 1. Share a `timm` model on the Hub 2. How to load that model back from the Hub ## Authent...
pytorch-image-models/hfdocs/source/hf_hub.mdx/0
{ "file_path": "pytorch-image-models/hfdocs/source/hf_hub.mdx", "repo_id": "pytorch-image-models", "token_count": 593 }
252
# TResNet A **TResNet** is a variant on a [ResNet](https://paperswithcode.com/method/resnet) that aim to boost accuracy while maintaining GPU training and inference efficiency. They contain several design tricks including a SpaceToDepth stem, [Anti-Alias downsampling](https://paperswithcode.com/method/anti-alias-down...
pytorch-image-models/hfdocs/source/models/tresnet.mdx/0
{ "file_path": "pytorch-image-models/hfdocs/source/models/tresnet.mdx", "repo_id": "pytorch-image-models", "token_count": 4203 }
253
import numpy as np import pandas as pd results = { 'results-imagenet.csv': [ 'results-imagenet-real.csv', 'results-imagenetv2-matched-frequency.csv', 'results-sketch.csv' ], 'results-imagenet-a-clean.csv': [ 'results-imagenet-a.csv', ], 'results-imagenet-r-clean.csv...
pytorch-image-models/results/generate_csv_results.py/0
{ "file_path": "pytorch-image-models/results/generate_csv_results.py", "repo_id": "pytorch-image-models", "token_count": 1453 }
254
from .version import __version__ as __version__ from .layers import ( is_scriptable as is_scriptable, is_exportable as is_exportable, set_scriptable as set_scriptable, set_exportable as set_exportable, ) from .models import ( create_model as create_model, list_models as list_models, list_pre...
pytorch-image-models/timm/__init__.py/0
{ "file_path": "pytorch-image-models/timm/__init__.py", "repo_id": "pytorch-image-models", "token_count": 219 }
255
""" Mixup and Cutmix Papers: mixup: Beyond Empirical Risk Minimization (https://arxiv.org/abs/1710.09412) CutMix: Regularization Strategy to Train Strong Classifiers with Localizable Features (https://arxiv.org/abs/1905.04899) Code Reference: CutMix: https://github.com/clovaai/CutMix-PyTorch Hacked together by / Co...
pytorch-image-models/timm/data/mixup.py/0
{ "file_path": "pytorch-image-models/timm/data/mixup.py", "repo_id": "pytorch-image-models", "token_count": 8184 }
256
""" A dataset reader that reads single tarfile based datasets This reader can read datasets consisting if a single tarfile containing images. I am planning to deprecated it in favour of ParerImageInTar. Hacked together by / Copyright 2020 Ross Wightman """ import os import tarfile from timm.utils.misc import natural...
pytorch-image-models/timm/data/readers/reader_image_tar.py/0
{ "file_path": "pytorch-image-models/timm/data/readers/reader_image_tar.py", "repo_id": "pytorch-image-models", "token_count": 1071 }
257
""" Attention Pool 2D Implementations of 2D spatial feature pooling using multi-head attention instead of average pool. Based on idea in CLIP by OpenAI, licensed Apache 2.0 https://github.com/openai/CLIP/blob/3b473b0e682c091a9e53623eebc1ca1657385717/clip/model.py Hacked together by / Copyright 2021 Ross Wightman """...
pytorch-image-models/timm/layers/attention_pool2d.py/0
{ "file_path": "pytorch-image-models/timm/layers/attention_pool2d.py", "repo_id": "pytorch-image-models", "token_count": 5737 }
258
""" EvoNorm in PyTorch Based on `Evolving Normalization-Activation Layers` - https://arxiv.org/abs/2004.02967 @inproceedings{NEURIPS2020, author = {Liu, Hanxiao and Brock, Andy and Simonyan, Karen and Le, Quoc}, booktitle = {Advances in Neural Information Processing Systems}, editor = {H. Larochelle and M. Ranzato ...
pytorch-image-models/timm/layers/evo_norm.py/0
{ "file_path": "pytorch-image-models/timm/layers/evo_norm.py", "repo_id": "pytorch-image-models", "token_count": 6684 }
259
""" Median Pool Hacked together by / Copyright 2020 Ross Wightman """ import torch.nn as nn import torch.nn.functional as F from .helpers import to_2tuple, to_4tuple class MedianPool2d(nn.Module): """ Median pool (usable as median filter when stride=1) module. Args: kernel_size: size of pooling kern...
pytorch-image-models/timm/layers/median_pool.py/0
{ "file_path": "pytorch-image-models/timm/layers/median_pool.py", "repo_id": "pytorch-image-models", "token_count": 883 }
260
""" Depthwise Separable Conv Modules Basic DWS convs. Other variations of DWS exist with batch norm or activations between the DW and PW convs such as the Depthwise modules in MobileNetV2 / EfficientNet and Xception. Hacked together by / Copyright 2020 Ross Wightman """ from torch import nn as nn from .create_conv2d...
pytorch-image-models/timm/layers/separable_conv.py/0
{ "file_path": "pytorch-image-models/timm/layers/separable_conv.py", "repo_id": "pytorch-image-models", "token_count": 1138 }
261
import dataclasses import logging import os from copy import deepcopy from pathlib import Path from typing import Any, Callable, Dict, List, Optional, Tuple, Type, TypeVar, Union from torch import nn as nn from torch.hub import load_state_dict_from_url from timm.models._features import FeatureListNet, FeatureDictNet,...
pytorch-image-models/timm/models/_builder.py/0
{ "file_path": "pytorch-image-models/timm/models/_builder.py", "repo_id": "pytorch-image-models", "token_count": 9114 }
262
""" Model Registry Hacked together by / Copyright 2020 Ross Wightman """ import fnmatch import re import sys import warnings from collections import defaultdict, deque from copy import deepcopy from dataclasses import replace from typing import Any, Callable, Dict, Iterable, List, Optional, Set, Sequence, Union, Tuple...
pytorch-image-models/timm/models/_registry.py/0
{ "file_path": "pytorch-image-models/timm/models/_registry.py", "repo_id": "pytorch-image-models", "token_count": 5725 }
263
""" EdgeNeXt Paper: `EdgeNeXt: Efficiently Amalgamated CNN-Transformer Architecture for Mobile Vision Applications` - https://arxiv.org/abs/2206.10589 Original code and weights from https://github.com/mmaaz60/EdgeNeXt Modifications and additions for timm by / Copyright 2022, Ross Wightman """ import math from funct...
pytorch-image-models/timm/models/edgenext.py/0
{ "file_path": "pytorch-image-models/timm/models/edgenext.py", "repo_id": "pytorch-image-models", "token_count": 12219 }
264
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", FutureWarning)
pytorch-image-models/timm/models/helpers.py/0
{ "file_path": "pytorch-image-models/timm/models/helpers.py", "repo_id": "pytorch-image-models", "token_count": 62 }
265
""" MobileNet V3 A PyTorch impl of MobileNet-V3, compatible with TF weights from official impl. Paper: Searching for MobileNetV3 - https://arxiv.org/abs/1905.02244 Hacked together by / Copyright 2019, Ross Wightman """ from functools import partial from typing import Any, Dict, Callable, List, Optional, Tuple, Union...
pytorch-image-models/timm/models/mobilenetv3.py/0
{ "file_path": "pytorch-image-models/timm/models/mobilenetv3.py", "repo_id": "pytorch-image-models", "token_count": 32542 }
266
""" RepViT Paper: `RepViT: Revisiting Mobile CNN From ViT Perspective` - https://arxiv.org/abs/2307.09283 @misc{wang2023repvit, title={RepViT: Revisiting Mobile CNN From ViT Perspective}, author={Ao Wang and Hui Chen and Zijia Lin and Hengjun Pu and Guiguang Ding}, year={2023}, eprint={230...
pytorch-image-models/timm/models/repvit.py/0
{ "file_path": "pytorch-image-models/timm/models/repvit.py", "repo_id": "pytorch-image-models", "token_count": 9407 }
267
""" TinyViT Paper: `TinyViT: Fast Pretraining Distillation for Small Vision Transformers` - https://arxiv.org/abs/2207.10666 Adapted from official impl at https://github.com/microsoft/Cream/tree/main/TinyViT """ __all__ = ['TinyVit'] import itertools from functools import partial from typing import Dict, List, ...
pytorch-image-models/timm/models/tiny_vit.py/0
{ "file_path": "pytorch-image-models/timm/models/tiny_vit.py", "repo_id": "pytorch-image-models", "token_count": 13498 }
268
from .adabelief import AdaBelief from .adafactor import Adafactor from .adafactor_bv import AdafactorBigVision from .adahessian import Adahessian from .adamp import AdamP from .adamw import AdamWLegacy from .adan import Adan from .adopt import Adopt from .lamb import Lamb from .laprop import LaProp from .lars import La...
pytorch-image-models/timm/optim/__init__.py/0
{ "file_path": "pytorch-image-models/timm/optim/__init__.py", "repo_id": "pytorch-image-models", "token_count": 385 }
269
""" Lion Optimizer Paper: `Symbolic Discovery of Optimization Algorithms` - https://arxiv.org/abs/2302.06675 Original Impl: https://github.com/google/automl/tree/master/lion References for added functionality: Cautious Optimizers: https://arxiv.org/abs/2411.16085 Why Gradients Rapidly Increase Near the End of ...
pytorch-image-models/timm/optim/lion.py/0
{ "file_path": "pytorch-image-models/timm/optim/lion.py", "repo_id": "pytorch-image-models", "token_count": 4091 }
270
""" Plateau Scheduler Adapts PyTorch plateau scheduler and allows application of noise, warmup. Hacked together by / Copyright 2020 Ross Wightman """ import torch from typing import List from .scheduler import Scheduler class PlateauLRScheduler(Scheduler): """Decay the LR by a factor every time the validation ...
pytorch-image-models/timm/scheduler/plateau_lr.py/0
{ "file_path": "pytorch-image-models/timm/scheduler/plateau_lr.py", "repo_id": "pytorch-image-models", "token_count": 1807 }
271
""" Eval metrics and related Hacked together by / Copyright 2020 Ross Wightman """ class AverageMeter: """Computes and stores the average and current value""" def __init__(self): self.reset() def reset(self): self.val = 0 self.avg = 0 self.sum = 0 self.count = 0 ...
pytorch-image-models/timm/utils/metrics.py/0
{ "file_path": "pytorch-image-models/timm/utils/metrics.py", "repo_id": "pytorch-image-models", "token_count": 374 }
272
# Using different models [[open-in-colab]] `smolagents` provides a flexible framework that allows you to use various language models from different providers. This guide will show you how to use different model types with your agents. ## Available model types `smolagents` supports several model types out of the box...
smolagents/docs/source/en/examples/using_different_models.md/0
{ "file_path": "smolagents/docs/source/en/examples/using_different_models.md", "repo_id": "smolagents", "token_count": 1337 }
273
# Agents का परिचय ## 🤔 Agents क्या हैं? AI का उपयोग करने वाली किसी भी कुशल प्रणाली को LLM को वास्तविक दुनिया तक किसी प्रकार की पहुंच प्रदान करने की आवश्यकता होगी: उदाहरण के लिए बाहरी जानकारी प्राप्त करने के लिए एक खोज टूल को कॉल करने की संभावना, या किसी कार्य को हल करने के लिए कुछ प्रोग्राम पर कार्य करने की। दूसरे श...
smolagents/docs/source/hi/conceptual_guides/intro_agents.md/0
{ "file_path": "smolagents/docs/source/hi/conceptual_guides/intro_agents.md", "repo_id": "smolagents", "token_count": 11425 }
274
# 멀티 에이전트 시스템 오케스트레이션 🤖🤝🤖 [[Colab에서 열기]] 이 노트북에서는 **멀티 에이전트 웹 브라우저**를 만들어보겠습니다. 이는 웹을 사용하여 문제를 해결하기 위해 여러 에이전트가 협력하는 에이전트 시스템입니다! 멀티 에이전트는 간단한 계층 구조로 구성됩니다. ``` +----------------+ | Manager agent | +----------------+ | _______________|____...
smolagents/docs/source/ko/examples/multiagents.md/0
{ "file_path": "smolagents/docs/source/ko/examples/multiagents.md", "repo_id": "smolagents", "token_count": 5355 }
275
# Agents(智能体) <Tip warning={true}> Smolagents 是一个实验性的 API,可能会随时发生变化。由于 API 或底层模型可能发生变化,代理返回的结果也可能有所不同。 </Tip> 要了解有关智能体和工具的更多信息,请务必阅读[入门指南](../index)。本页面包含基础类的 API 文档。 ## 智能体(Agents) 我们的智能体继承自 [`MultiStepAgent`],这意味着它们可以执行多步操作,每一步包含一个思考(thought),然后是一个工具调用和执行。请阅读[概念指南](../conceptual_guides/react)以了解更多信息。 我们提供两种类型的...
smolagents/docs/source/zh/reference/agents.md/0
{ "file_path": "smolagents/docs/source/zh/reference/agents.md", "repo_id": "smolagents", "token_count": 830 }
276
import requests # from smolagents.agents import ToolCallingAgent from smolagents import CodeAgent, InferenceClientModel, tool # Choose which LLM engine to use! model = InferenceClientModel() # model = TransformersModel(model_id="meta-llama/Llama-3.2-2B-Instruct") # For anthropic: change model_id below to 'anthropic...
smolagents/examples/multiple_tools.py/0
{ "file_path": "smolagents/examples/multiple_tools.py", "repo_id": "smolagents", "token_count": 3110 }
277
# Human-in-the-Loop: Customize Agent Plan Interactively This example demonstrates advanced usage of the smolagents library, specifically showing how to implement Human-in-the-Loop strategies to: 1. **Interrupt agent execution after plan creation** using step callbacks 2. **Allow user interaction** to review and modif...
smolagents/examples/plan_customization/README.md/0
{ "file_path": "smolagents/examples/plan_customization/README.md", "repo_id": "smolagents", "token_count": 1114 }
278
#!/usr/bin/env python # coding=utf-8 # 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/L...
smolagents/src/smolagents/cli.py/0
{ "file_path": "smolagents/src/smolagents/cli.py", "repo_id": "smolagents", "token_count": 2110 }
279
# 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...
smolagents/tests/test_models.py/0
{ "file_path": "smolagents/tests/test_models.py", "repo_id": "smolagents", "token_count": 16498 }
280
[workspace] members = [ "benchmark", "backends/v2", "backends/v3", "backends/grpc-metadata", "backends/trtllm", "backends/llamacpp", "launcher", "router" ] default-members = [ "benchmark", "backends/v2", "backends/v3", "backends/grpc-metadata", # "backends/trtllm", ...
text-generation-inference/Cargo.toml/0
{ "file_path": "text-generation-inference/Cargo.toml", "repo_id": "text-generation-inference", "token_count": 512 }
281
[package] name = "text-generation-client" version.workspace = true edition.workspace = true authors.workspace = true homepage.workspace = true [dependencies] async-trait = "^0.1" base64 = { workspace = true } futures = "^0.3" grpc-metadata = { path = "../grpc-metadata" } prost = "^0.12" thiserror = "^1.0" tokio = { ve...
text-generation-inference/backends/client/Cargo.toml/0
{ "file_path": "text-generation-inference/backends/client/Cargo.toml", "repo_id": "text-generation-inference", "token_count": 202 }
282
fbgemm_commit := v0.8.0 build-fbgemm: @if [ ! -d "fbgemm" ]; then \ git clone https://github.com/pytorch/FBGEMM.git fbgemm; \ fi cd fbgemm && git fetch && git checkout $(fbgemm_commit) && \ git submodule update --init --recursive && \ cd fbgemm_gpu && \ pip install -r requirements.txt && \ CUDA_ARCH_LIST="8....
text-generation-inference/backends/gaudi/server/Makefile-fbgemm/0
{ "file_path": "text-generation-inference/backends/gaudi/server/Makefile-fbgemm", "repo_id": "text-generation-inference", "token_count": 337 }
283
import torch from typing import Dict, Optional, TypeVar from text_generation_server.models.types import Batch B = TypeVar("B", bound=Batch) class Cache: def __init__(self): self.cache: Dict[int, B] = {} def pop(self, batch_id: int) -> Optional[B]: return self.cache.pop(batch_id, None) ...
text-generation-inference/backends/gaudi/server/text_generation_server/cache.py/0
{ "file_path": "text-generation-inference/backends/gaudi/server/text_generation_server/cache.py", "repo_id": "text-generation-inference", "token_count": 359 }
284
from dataclasses import dataclass from typing import List, Union import torch from text_generation_server.utils.weights import Weight, Weights, WeightsLoader @dataclass class Exl2Weight(Weight): """ Exllama2 exl2 quantized weights. """ q_weight: torch.Tensor q_scale: torch.Tensor q_invperm: ...
text-generation-inference/backends/gaudi/server/text_generation_server/layers/exl2.py/0
{ "file_path": "text-generation-inference/backends/gaudi/server/text_generation_server/layers/exl2.py", "repo_id": "text-generation-inference", "token_count": 1050 }
285
import torch import json from typing import Tuple, Optional from text_generation_server.layers.tensor_parallel import TensorParallelHead from text_generation_server.layers.medusa import MedusaHeadV1, MedusaHeadV2 from text_generation_server.layers.mlp import MLPSpeculatorHead class SpeculativeHead(torch.nn.Module): ...
text-generation-inference/backends/gaudi/server/text_generation_server/layers/speculative.py/0
{ "file_path": "text-generation-inference/backends/gaudi/server/text_generation_server/layers/speculative.py", "repo_id": "text-generation-inference", "token_count": 851 }
286
# coding=utf-8 # Copyright 2022 EleutherAI and the HuggingFace Inc. team. All rights reserved. # # This code is based on EleutherAI's GPT-NeoX library and the GPT-NeoX # and OPT implementations in this library. It has been modified from its # original forms to accommodate minor architectural differences compared # to G...
text-generation-inference/backends/gaudi/server/text_generation_server/models/custom_modeling/flash_llama_modeling.py/0
{ "file_path": "text-generation-inference/backends/gaudi/server/text_generation_server/models/custom_modeling/flash_llama_modeling.py", "repo_id": "text-generation-inference", "token_count": 11549 }
287
# coding=utf-8 # Copyright 2024 the HuggingFace Inc. team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless r...
text-generation-inference/backends/gaudi/server/text_generation_server/models/custom_modeling/idefics3.py/0
{ "file_path": "text-generation-inference/backends/gaudi/server/text_generation_server/models/custom_modeling/idefics3.py", "repo_id": "text-generation-inference", "token_count": 10886 }
288
# Copyright (C) 2024 Habana Labs, Ltd. an Intel Company. from text_generation_server.utils.convert import convert_file, convert_files from text_generation_server.utils.dist import initialize_torch_distributed from text_generation_server.utils.weights import Weights from text_generation_server.utils.peft import downloa...
text-generation-inference/backends/gaudi/server/text_generation_server/utils/__init__.py/0
{ "file_path": "text-generation-inference/backends/gaudi/server/text_generation_server/utils/__init__.py", "repo_id": "text-generation-inference", "token_count": 516 }
289
# Origin: https://github.com/predibase/lorax # Path: lorax/server/lorax_server/utils/segments.py # License: Apache License Version 2.0, January 2004 from typing import List, Tuple, Union import torch def find_segments( adapter_indices: Union[torch.Tensor, List[int]], ) -> Tuple[List[int], List[int]]: ...
text-generation-inference/backends/gaudi/server/text_generation_server/utils/segments.py/0
{ "file_path": "text-generation-inference/backends/gaudi/server/text_generation_server/utils/segments.py", "repo_id": "text-generation-inference", "token_count": 1082 }
290
mod backend; mod llamacpp; mod quantize; use quantize::QuantizeType; use backend::{ BackendError, LlamacppBackend, LlamacppConfig, LlamacppGGMLType, LlamacppNuma, LlamacppSplitMode, }; use clap::Parser; use hf_hub::api::tokio::ApiBuilder; use hf_hub::{Repo, RepoType}; use std::path::Path; use text_generation_...
text-generation-inference/backends/llamacpp/src/main.rs/0
{ "file_path": "text-generation-inference/backends/llamacpp/src/main.rs", "repo_id": "text-generation-inference", "token_count": 4967 }
291
import copy import logging import subprocess import sys from tempfile import TemporaryDirectory import os import pytest from transformers import AutoTokenizer from optimum.neuron.cache import synchronize_hub_cache logging.basicConfig( level=logging.INFO, format="[%(asctime)s] %(levelname)s [%(filename)s.%(...
text-generation-inference/backends/neuron/tests/fixtures/model.py/0
{ "file_path": "text-generation-inference/backends/neuron/tests/fixtures/model.py", "repo_id": "text-generation-inference", "token_count": 1570 }
292
# Text Generation Inference - TensorRT-LLM Backend Implementation ## Description This folder provides the sources of the TensorRT-LLM backend implementation powered by TensorRT-LLM Executor new API ## Simplified Request Sequence ```mermaid sequenceDiagram actor User participant TextGenerationInference.HttpS...
text-generation-inference/backends/trtllm/README.md/0
{ "file_path": "text-generation-inference/backends/trtllm/README.md", "repo_id": "text-generation-inference", "token_count": 1019 }
293
/// /// Extract the first line of the provided string reference. /// If there is no lines in the buffer, it returns a string /// which content is defined by the content of `fail` /// # Arguments /// /// * `s`: The string buffer to extract the first-line from /// * `fail`: A string content which is returned if no lines ...
text-generation-inference/backends/trtllm/src/utils.rs/0
{ "file_path": "text-generation-inference/backends/trtllm/src/utils.rs", "repo_id": "text-generation-inference", "token_count": 201 }
294
use std::sync::Arc; use tokio::sync::{mpsc, oneshot}; use crate::radix::RadixAllocator; use text_generation_router::usage_stats::Env; #[derive(Debug, Clone)] pub struct BlockAllocation { pub allocation_id: u64, pub blocks: Vec<u32>, pub slots: Vec<u32>, /// Prefix that was cached and for which the KV ...
text-generation-inference/backends/v3/src/block_allocator.rs/0
{ "file_path": "text-generation-inference/backends/v3/src/block_allocator.rs", "repo_id": "text-generation-inference", "token_count": 3274 }
295
/// MIT License // // Copyright (c) 2020 hatoo // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merg...
text-generation-inference/benchmark/src/utils.rs/0
{ "file_path": "text-generation-inference/benchmark/src/utils.rs", "repo_id": "text-generation-inference", "token_count": 598 }
296
{ "git+https://github.com/dottxt-ai/outlines-core.git?rev=ba10c619fc9bf3c487e43f49bdecb95a24bb465c#outlines-core@0.1.0": "1j9dcd831b0bmmjk2n4aag3x47qnqmkpg4gqpvwwyic7744llbfm" }
text-generation-inference/crate-hashes.json/0
{ "file_path": "text-generation-inference/crate-hashes.json", "repo_id": "text-generation-inference", "token_count": 106 }
297
# Train Medusa This tutorial will show you how to train a Medusa model on a dataset of your choice. Please check out the [speculation documentation](../conceptual/speculation) for more information on how Medusa works and speculation in general. ## What are the benefits of training a Medusa model? Training Medusa hea...
text-generation-inference/docs/source/basic_tutorials/train_medusa.md/0
{ "file_path": "text-generation-inference/docs/source/basic_tutorials/train_medusa.md", "repo_id": "text-generation-inference", "token_count": 3478 }
298
# Installation from source <Tip warning={true}> Installing TGI from source is not the recommended usage. We strongly recommend to use TGI through Docker, check the [Quick Tour](./quicktour), [Installation for Nvidia GPUs](./installation_nvidia) and [Installation for AMD GPUs](./installation_amd) to learn how to use T...
text-generation-inference/docs/source/installation.md/0
{ "file_path": "text-generation-inference/docs/source/installation.md", "repo_id": "text-generation-inference", "token_count": 727 }
299
pytest_plugins = [ "fixtures.neuron.service", "fixtures.neuron.export_models", "fixtures.gaudi.service", ] # ruff: noqa: E402 from _pytest.fixtures import SubRequest from huggingface_hub.inference._generated.types.chat_completion import ( ChatCompletionStreamOutput, ChatCompletionOutput, ) from open...
text-generation-inference/integration-tests/conftest.py/0
{ "file_path": "text-generation-inference/integration-tests/conftest.py", "repo_id": "text-generation-inference", "token_count": 13377 }
300
{ "details": { "best_of_sequences": null, "finish_reason": "length", "generated_tokens": 10, "prefill": [], "seed": null, "tokens": [ { "id": 23090, "logprob": -1.8251953, "special": false, "text": " Hello" }, { "id": 23, "logpr...
text-generation-inference/integration-tests/models/__snapshots__/test_flash_falcon/test_flash_falcon.json/0
{ "file_path": "text-generation-inference/integration-tests/models/__snapshots__/test_flash_falcon/test_flash_falcon.json", "repo_id": "text-generation-inference", "token_count": 850 }
301
{ "details": { "best_of_sequences": null, "finish_reason": "length", "generated_tokens": 10, "prefill": [], "seed": 0, "tokens": [ { "id": 604, "logprob": -0.28271484, "special": false, "text": " for" }, { "id": 573, "logprob": ...
text-generation-inference/integration-tests/models/__snapshots__/test_flash_gemma_gptq/test_flash_gemma_gptq_all_params.json/0
{ "file_path": "text-generation-inference/integration-tests/models/__snapshots__/test_flash_gemma_gptq/test_flash_gemma_gptq_all_params.json", "repo_id": "text-generation-inference", "token_count": 867 }
302
{ "details": { "best_of_sequences": null, "finish_reason": "length", "generated_tokens": 10, "prefill": [], "seed": 0, "tokens": [ { "id": 25, "logprob": -0.88183594, "special": false, "text": ":" }, { "id": 2209, "logprob": -2....
text-generation-inference/integration-tests/models/__snapshots__/test_flash_llama_fp8/test_flash_llama_fp8_all_params.json/0
{ "file_path": "text-generation-inference/integration-tests/models/__snapshots__/test_flash_llama_fp8/test_flash_llama_fp8_all_params.json", "repo_id": "text-generation-inference", "token_count": 868 }
303
{ "details": { "best_of_sequences": null, "finish_reason": "length", "generated_tokens": 10, "prefill": [], "seed": 0, "tokens": [ { "id": 13, "logprob": -1.1582031, "special": false, "text": "\n" }, { "id": 2772, "logprob": -0....
text-generation-inference/integration-tests/models/__snapshots__/test_flash_medusa/test_flash_medusa_all_params.json/0
{ "file_path": "text-generation-inference/integration-tests/models/__snapshots__/test_flash_medusa/test_flash_medusa_all_params.json", "repo_id": "text-generation-inference", "token_count": 847 }
304
{ "details": { "best_of_sequences": null, "finish_reason": "length", "generated_tokens": 60, "prefill": [], "seed": 0, "tokens": [ { "id": 222, "logprob": 0.0, "special": false, "text": "\n" }, { "id": 222, "logprob": 0.0, ...
text-generation-inference/integration-tests/models/__snapshots__/test_flash_starcoder2_lora/test_flash_starcoder2_default_params.json/0
{ "file_path": "text-generation-inference/integration-tests/models/__snapshots__/test_flash_starcoder2_lora/test_flash_starcoder2_default_params.json", "repo_id": "text-generation-inference", "token_count": 4513 }
305
{ "details": { "best_of_sequences": null, "finish_reason": "eos_token", "generated_tokens": 19, "prefill": [], "seed": null, "tokens": [ { "id": 415, "logprob": -0.03665161, "special": false, "text": " The" }, { "id": 12072, "lo...
text-generation-inference/integration-tests/models/__snapshots__/test_idefics2/test_flash_idefics2_two_images.json/0
{ "file_path": "text-generation-inference/integration-tests/models/__snapshots__/test_idefics2/test_flash_idefics2_two_images.json", "repo_id": "text-generation-inference", "token_count": 1559 }
306
{ "choices": [ { "finish_reason": "stop", "index": 0, "logprobs": null, "message": { "content": null, "role": "assistant", "tool_calls": [ { "function": { "arguments": "{\"location\":\"Brooklyn, NY\",\"format\":\"fahrenheit\"}", ...
text-generation-inference/integration-tests/models/__snapshots__/test_tools_llama/test_flash_llama_grammar_tools_auto_nostream.json/0
{ "file_path": "text-generation-inference/integration-tests/models/__snapshots__/test_tools_llama/test_flash_llama_grammar_tools_auto_nostream.json", "repo_id": "text-generation-inference", "token_count": 421 }
307
{ "choices": [ { "finish_reason": "stop", "index": 0, "logprobs": null, "message": { "content": "The image shows a brown cow standing on the beach with a white face and black and white marking on its ears. The cow has a white patch around its nose and mouth. The ocean and blue sky ...
text-generation-inference/integration-tests/models/__snapshots__/test_transformers_llama4/test_flash_llama4_image_cow.json/0
{ "file_path": "text-generation-inference/integration-tests/models/__snapshots__/test_transformers_llama4/test_flash_llama4_image_cow.json", "repo_id": "text-generation-inference", "token_count": 314 }
308
import pytest @pytest.fixture(scope="module") def flash_llama_awq_handle_sharded(launcher): with launcher( "abhinavkulkarni/codellama-CodeLlama-7b-Python-hf-w4-g128-awq", num_shard=2, quantize="awq", ) as handle: yield handle @pytest.fixture(scope="module") async def flash_ll...
text-generation-inference/integration-tests/models/test_flash_awq_sharded.py/0
{ "file_path": "text-generation-inference/integration-tests/models/test_flash_awq_sharded.py", "repo_id": "text-generation-inference", "token_count": 624 }
309