text
stringlengths
7
1.24M
id
stringlengths
14
166
metadata
dict
__index_level_0__
int64
0
519
# Copyright 2024 Stability AI, Katherine Crowson 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-...
diffusers/src/diffusers/schedulers/scheduling_flow_match_heun_discrete.py/0
{ "file_path": "diffusers/src/diffusers/schedulers/scheduling_flow_match_heun_discrete.py", "repo_id": "diffusers", "token_count": 5232 }
151
# Copyright 2024 Kakao Brain and The HuggingFace Team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requi...
diffusers/src/diffusers/schedulers/scheduling_unclip.py/0
{ "file_path": "diffusers/src/diffusers/schedulers/scheduling_unclip.py", "repo_id": "diffusers", "token_count": 6237 }
152
# This file is autogenerated by the command `make fix-copies`, do not edit. from ..utils import DummyObject, requires_backends class AudioDiffusionPipeline(metaclass=DummyObject): _backends = ["torch", "librosa"] def __init__(self, *args, **kwargs): requires_backends(self, ["torch", "librosa"]) ...
diffusers/src/diffusers/utils/dummy_torch_and_librosa_objects.py/0
{ "file_path": "diffusers/src/diffusers/utils/dummy_torch_and_librosa_objects.py", "repo_id": "diffusers", "token_count": 397 }
153
# Copyright 2024 The HuggingFace Team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
diffusers/src/diffusers/utils/peft_utils.py/0
{ "file_path": "diffusers/src/diffusers/utils/peft_utils.py", "repo_id": "diffusers", "token_count": 4779 }
154
# coding=utf-8 # Copyright 2024 HuggingFace Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
diffusers/tests/lora/utils.py/0
{ "file_path": "diffusers/tests/lora/utils.py", "repo_id": "diffusers", "token_count": 41726 }
155
# coding=utf-8 # Copyright 2024 HuggingFace Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
diffusers/tests/models/transformers/test_models_transformer_cogvideox.py/0
{ "file_path": "diffusers/tests/models/transformers/test_models_transformer_cogvideox.py", "repo_id": "diffusers", "token_count": 1068 }
156
# coding=utf-8 # Copyright 2024 HuggingFace Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
diffusers/tests/models/unets/test_unet_2d_blocks.py/0
{ "file_path": "diffusers/tests/models/unets/test_unet_2d_blocks.py", "repo_id": "diffusers", "token_count": 5186 }
157
# coding=utf-8 # Copyright 2024 HuggingFace Inc and Tencent Hunyuan 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...
diffusers/tests/pipelines/controlnet_hunyuandit/test_controlnet_hunyuandit.py/0
{ "file_path": "diffusers/tests/pipelines/controlnet_hunyuandit/test_controlnet_hunyuandit.py", "repo_id": "diffusers", "token_count": 5987 }
158
# coding=utf-8 # Copyright 2024 HuggingFace Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
diffusers/tests/pipelines/kolors/test_kolors.py/0
{ "file_path": "diffusers/tests/pipelines/kolors/test_kolors.py", "repo_id": "diffusers", "token_count": 2344 }
159
# Copyright 2024 Marigold authors, PRS ETH Zurich. All rights reserved. # 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 # # htt...
diffusers/tests/pipelines/marigold/test_marigold_depth.py/0
{ "file_path": "diffusers/tests/pipelines/marigold/test_marigold_depth.py", "repo_id": "diffusers", "token_count": 8593 }
160
# coding=utf-8 # Copyright 2024 HuggingFace Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
diffusers/tests/pipelines/pag/test_pag_sdxl_inpaint.py/0
{ "file_path": "diffusers/tests/pipelines/pag/test_pag_sdxl_inpaint.py", "repo_id": "diffusers", "token_count": 5988 }
161
# coding=utf-8 # Copyright 2022 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_adapter/test_stable_diffusion_adapter.py/0
{ "file_path": "diffusers/tests/pipelines/stable_diffusion_adapter/test_stable_diffusion_adapter.py", "repo_id": "diffusers", "token_count": 18773 }
162
# coding=utf-8 # Copyright 2024 HuggingFace Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
diffusers/tests/pipelines/stable_diffusion_sag/test_stable_diffusion_sag.py/0
{ "file_path": "diffusers/tests/pipelines/stable_diffusion_sag/test_stable_diffusion_sag.py", "repo_id": "diffusers", "token_count": 3617 }
163
# coding=utf-8 # Copyright 2024 HuggingFace Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
diffusers/tests/pipelines/test_pipelines_combined.py/0
{ "file_path": "diffusers/tests/pipelines/test_pipelines_combined.py", "repo_id": "diffusers", "token_count": 2384 }
164
# coding=utf-8 # Copyright 2024 HuggingFace Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
diffusers/tests/pipelines/wuerstchen/test_wuerstchen_decoder.py/0
{ "file_path": "diffusers/tests/pipelines/wuerstchen/test_wuerstchen_decoder.py", "repo_id": "diffusers", "token_count": 2630 }
165
import torch from diffusers import EulerDiscreteScheduler from diffusers.utils.testing_utils import torch_device from .test_schedulers import SchedulerCommonTest class EulerDiscreteSchedulerTest(SchedulerCommonTest): scheduler_classes = (EulerDiscreteScheduler,) num_inference_steps = 10 def get_schedul...
diffusers/tests/schedulers/test_scheduler_euler.py/0
{ "file_path": "diffusers/tests/schedulers/test_scheduler_euler.py", "repo_id": "diffusers", "token_count": 4760 }
166
# coding=utf-8 # Copyright 2024 HuggingFace Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
diffusers/tests/schedulers/test_schedulers.py/0
{ "file_path": "diffusers/tests/schedulers/test_schedulers.py", "repo_id": "diffusers", "token_count": 17208 }
167
import gc import unittest import torch from diffusers import ( DDIMScheduler, StableDiffusionXLImg2ImgPipeline, ) from diffusers.utils import load_image from diffusers.utils.testing_utils import ( enable_full_determinism, numpy_cosine_similarity_distance, require_torch_gpu, slow, ) from .sing...
diffusers/tests/single_file/test_stable_diffusion_xl_img2img_single_file.py/0
{ "file_path": "diffusers/tests/single_file/test_stable_diffusion_xl_img2img_single_file.py", "repo_id": "diffusers", "token_count": 1728 }
168
# coding=utf-8 # Copyright 2024 The HuggingFace Team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requir...
diffusers/utils/notify_community_pipelines_mirror.py/0
{ "file_path": "diffusers/utils/notify_community_pipelines_mirror.py", "repo_id": "diffusers", "token_count": 679 }
169
# @package _global_ # Change the seed to match what PushT eval uses # (to avoid evaluating on seeds used for generating the training data). seed: 100000 # Change the dataset repository to the PushT one. dataset_repo_id: lerobot/pusht override_dataset_stats: observation.image: # stats from imagenet, since we use...
lerobot/examples/advanced/1_train_act_pusht/act_pusht.yaml/0
{ "file_path": "lerobot/examples/advanced/1_train_act_pusht/act_pusht.yaml", "repo_id": "lerobot", "token_count": 848 }
170
#!/usr/bin/env python # Copyright 2024 The HuggingFace Inc. team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # ...
lerobot/lerobot/common/datasets/push_dataset_to_hub/umi_zarr_format.py/0
{ "file_path": "lerobot/lerobot/common/datasets/push_dataset_to_hub/umi_zarr_format.py", "repo_id": "lerobot", "token_count": 3818 }
171
#!/usr/bin/env python # Copyright 2024 The HuggingFace Inc. team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # ...
lerobot/lerobot/common/policies/policy_protocol.py/0
{ "file_path": "lerobot/lerobot/common/policies/policy_protocol.py", "repo_id": "lerobot", "token_count": 818 }
172
#!/usr/bin/env python # Copyright 2024 The HuggingFace Inc. team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # ...
lerobot/lerobot/common/utils/import_utils.py/0
{ "file_path": "lerobot/lerobot/common/utils/import_utils.py", "repo_id": "lerobot", "token_count": 1045 }
173
# @package _global_ # Train with: # # python lerobot/scripts/train.py \ # env=pusht \ # env.gym.obs_type=environment_state_agent_pos \ # policy=tdmpc_pusht_keypoints \ # eval.batch_size=50 \ # eval.n_episodes=50 \ # eval.use_async_envs=true \ # device=cuda \ # use_amp=true seed: 1 dataset_repo_id: ler...
lerobot/lerobot/configs/policy/tdmpc_pusht_keypoints.yaml/0
{ "file_path": "lerobot/lerobot/configs/policy/tdmpc_pusht_keypoints.yaml", "repo_id": "lerobot", "token_count": 971 }
174
version https://git-lfs.github.com/spec/v1 oid sha256:5c96f47b569b7af82e05200213d733626664150aa7c5ae3298fd04a2138a2023 size 4344
lerobot/tests/data/lerobot/aloha_mobile_elevator/meta_data/stats.safetensors/0
{ "file_path": "lerobot/tests/data/lerobot/aloha_mobile_elevator/meta_data/stats.safetensors", "repo_id": "lerobot", "token_count": 64 }
175
version https://git-lfs.github.com/spec/v1 oid sha256:fbdd33bb556b796a1c09d62b00379af1b8769c1c1e1b2e84cb4f3942d45522df size 136
lerobot/tests/data/lerobot/aloha_static_candy/meta_data/episode_data_index.safetensors/0
{ "file_path": "lerobot/tests/data/lerobot/aloha_static_candy/meta_data/episode_data_index.safetensors", "repo_id": "lerobot", "token_count": 66 }
176
version https://git-lfs.github.com/spec/v1 oid sha256:9080d7e7dd70914305aa93e6933e9754b0ee4fd06411507906f91a2c4337f2c3 size 4208
lerobot/tests/data/lerobot/aloha_static_cups_open/meta_data/stats.safetensors/0
{ "file_path": "lerobot/tests/data/lerobot/aloha_static_cups_open/meta_data/stats.safetensors", "repo_id": "lerobot", "token_count": 67 }
177
version https://git-lfs.github.com/spec/v1 oid sha256:b8646242adb25c8986e2200a57c19de7fe126af12f4f3593ff53d31e9e3d6339 size 4752
lerobot/tests/data/lerobot/aloha_static_vinh_cup/meta_data/stats.safetensors/0
{ "file_path": "lerobot/tests/data/lerobot/aloha_static_vinh_cup/meta_data/stats.safetensors", "repo_id": "lerobot", "token_count": 65 }
178
version https://git-lfs.github.com/spec/v1 oid sha256:0e86b01d7cd15b629eb4645b1f41d5eff2577d0570d423d11e9a97bc0c7c27a6 size 3848
lerobot/tests/data/lerobot/unitreeh1_rearrange_objects/meta_data/stats.safetensors/0
{ "file_path": "lerobot/tests/data/lerobot/unitreeh1_rearrange_objects/meta_data/stats.safetensors", "repo_id": "lerobot", "token_count": 69 }
179
version https://git-lfs.github.com/spec/v1 oid sha256:95e0985c9180aee035813b801b3f92746fbbc65fb015826acd265b75c68c3049 size 3848
lerobot/tests/data/lerobot/unitreeh1_warehouse/meta_data/stats.safetensors/0
{ "file_path": "lerobot/tests/data/lerobot/unitreeh1_warehouse/meta_data/stats.safetensors", "repo_id": "lerobot", "token_count": 65 }
180
version https://git-lfs.github.com/spec/v1 oid sha256:c3dcff0a705ebfdaf11b7f49ad85b464eff03477ace3d63ce45d6a3a10b429d5 size 111338
lerobot/tests/data/save_dataset_to_safetensors/lerobot/pusht/frame_0.safetensors/0
{ "file_path": "lerobot/tests/data/save_dataset_to_safetensors/lerobot/pusht/frame_0.safetensors", "repo_id": "lerobot", "token_count": 65 }
181
version https://git-lfs.github.com/spec/v1 oid sha256:e39afdf1f3db8a72a1095a5a0ffdb7e67f478a28bd73e59cda197687da8d236c size 68
lerobot/tests/data/save_policy_to_safetensors/aloha_act/output_dict.safetensors/0
{ "file_path": "lerobot/tests/data/save_policy_to_safetensors/aloha_act/output_dict.safetensors", "repo_id": "lerobot", "token_count": 66 }
182
#!/usr/bin/env python # Copyright 2024 The HuggingFace Inc. team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # ...
lerobot/tests/test_datasets.py/0
{ "file_path": "lerobot/tests/test_datasets.py", "repo_id": "lerobot", "token_count": 7009 }
183
from parler_tts import ParlerTTSForCausalLM, ParlerTTSForConditionalGeneration, ParlerTTSDecoderConfig from transformers import AutoConfig import os import argparse if __name__ == "__main__": parser = argparse.ArgumentParser() parser.add_argument("save_directory", type=str, help="Directory where to save the m...
parler-tts/helpers/model_init_scripts/init_large_model.py/0
{ "file_path": "parler-tts/helpers/model_init_scripts/init_large_model.py", "repo_id": "parler-tts", "token_count": 1090 }
184
# Copyright 2024 The HuggingFace Team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
parler-tts/setup.py/0
{ "file_path": "parler-tts/setup.py", "repo_id": "parler-tts", "token_count": 722 }
185
<!--⚠️ Note that this file is in Markdown but contain specific syntax for our doc-builder (similar to MDX) that may not be rendered properly in your Markdown viewer. --> # DeepSpeed [DeepSpeed](https://www.deepspeed.ai/) is a library designed for speed and scale for distributed training of large models with billions ...
peft/docs/source/accelerate/deepspeed.md/0
{ "file_path": "peft/docs/source/accelerate/deepspeed.md", "repo_id": "peft", "token_count": 7470 }
186
<!--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/index.md/0
{ "file_path": "peft/docs/source/index.md", "repo_id": "peft", "token_count": 1161 }
187
<!--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/package_reference/multitask_prompt_tuning.md/0
{ "file_path": "peft/docs/source/package_reference/multitask_prompt_tuning.md", "repo_id": "peft", "token_count": 533 }
188
<!--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/tutorial/peft_model_config.md/0
{ "file_path": "peft/docs/source/tutorial/peft_model_config.md", "repo_id": "peft", "token_count": 2415 }
189
# Copyright 2023 The HuggingFace Team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
peft/examples/boft_controlnet/utils/unet_2d_condition.py/0
{ "file_path": "peft/examples/boft_controlnet/utils/unet_2d_condition.py", "repo_id": "peft", "token_count": 5908 }
190
<jupyter_start><jupyter_text>Training PEFT models with new tokens being added to the embedding layers and tokenizerIn this example, we will learn how to train a LoRA model when adding new tokens to the tokenizer and model. This is a common usecase when doing the following:1. Instruction finetuning with new tokens beind...
peft/examples/causal_language_modeling/peft_lora_clm_with_additional_tokens.ipynb/0
{ "file_path": "peft/examples/causal_language_modeling/peft_lora_clm_with_additional_tokens.ipynb", "repo_id": "peft", "token_count": 4577 }
191
<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": 3782 }
192
<jupyter_start><jupyter_code>!git clone https://huggingface.co/spaces/smangrul/peft-lora-sd-dreambooth %cd "peft-lora-sd-dreambooth" !pip install -r requirements.txt !python colab.py<jupyter_output><empty_output>
peft/examples/lora_dreambooth/colab_notebook.ipynb/0
{ "file_path": "peft/examples/lora_dreambooth/colab_notebook.ipynb", "repo_id": "peft", "token_count": 91 }
193
# Copyright 2023-present the HuggingFace Inc. team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
peft/examples/pissa_finetuning/pissa_finetuning.py/0
{ "file_path": "peft/examples/pissa_finetuning/pissa_finetuning.py", "repo_id": "peft", "token_count": 2619 }
194
<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": 11949 }
195
# Copyright 2023-present the HuggingFace Inc. team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
peft/src/peft/mixed_model.py/0
{ "file_path": "peft/src/peft/mixed_model.py", "repo_id": "peft", "token_count": 6949 }
196
# Copyright 2023-present the HuggingFace Inc. team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
peft/src/peft/tuners/adaption_prompt/model.py/0
{ "file_path": "peft/src/peft/tuners/adaption_prompt/model.py", "repo_id": "peft", "token_count": 2864 }
197
# 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/model.py/0
{ "file_path": "peft/src/peft/tuners/hra/model.py", "repo_id": "peft", "token_count": 5924 }
198
# Copyright 2023-present the HuggingFace Inc. team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
peft/src/peft/tuners/lokr/layer.py/0
{ "file_path": "peft/src/peft/tuners/lokr/layer.py", "repo_id": "peft", "token_count": 7398 }
199
# 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/mixed/model.py/0
{ "file_path": "peft/src/peft/tuners/mixed/model.py", "repo_id": "peft", "token_count": 6670 }
200
# flake8: noqa # There's no way to ignore "F401 '...' imported but unused" warnings in this # module, but to preserve other warnings. So, don't check this module at all # coding=utf-8 # Copyright 2023-present the HuggingFace Inc. team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not u...
peft/src/peft/utils/__init__.py/0
{ "file_path": "peft/src/peft/utils/__init__.py", "repo_id": "peft", "token_count": 793 }
201
#!/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_custom_models.py/0
{ "file_path": "peft/tests/test_custom_models.py", "repo_id": "peft", "token_count": 65289 }
202
# 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": 10843 }
203
# Upgrading from previous versions I generally try to maintain code interface and especially model weight compability across many `timm` versions. Sometimes there are exceptions. ## Checkpoint remapping Pretrained weight remapping is handled by `checkpoint_filter_fn` in a model implementation module. This remaps old...
pytorch-image-models/UPGRADING.md/0
{ "file_path": "pytorch-image-models/UPGRADING.md", "repo_id": "pytorch-image-models", "token_count": 694 }
204
# Adversarial Inception v3 **Inception v3** is a convolutional neural network architecture from the Inception family that makes several improvements including using [Label Smoothing](https://paperswithcode.com/method/label-smoothing), Factorized 7 x 7 convolutions, and the use of an [auxiliary classifer](https://paper...
pytorch-image-models/hfdocs/source/models/adversarial-inception-v3.mdx/0
{ "file_path": "pytorch-image-models/hfdocs/source/models/adversarial-inception-v3.mdx", "repo_id": "pytorch-image-models", "token_count": 2247 }
205
# (Gluon) ResNet **Residual Networks**, or **ResNets**, learn residual functions with reference to the layer inputs, instead of learning unreferenced functions. Instead of hoping each few stacked layers directly fit a desired underlying mapping, residual nets let these layers fit a residual mapping. They stack [residu...
pytorch-image-models/hfdocs/source/models/gloun-resnet.mdx/0
{ "file_path": "pytorch-image-models/hfdocs/source/models/gloun-resnet.mdx", "repo_id": "pytorch-image-models", "token_count": 7210 }
206
# SK-ResNet **SK ResNet** is a variant of a [ResNet](https://www.paperswithcode.com/method/resnet) that employs a [Selective Kernel](https://paperswithcode.com/method/selective-kernel) unit. In general, all the large kernel convolutions in the original bottleneck blocks in ResNet are replaced by the proposed [SK convo...
pytorch-image-models/hfdocs/source/models/skresnet.mdx/0
{ "file_path": "pytorch-image-models/hfdocs/source/models/skresnet.mdx", "repo_id": "pytorch-image-models", "token_count": 2082 }
207
# Data [[autodoc]] timm.data.create_dataset [[autodoc]] timm.data.create_loader [[autodoc]] timm.data.create_transform [[autodoc]] timm.data.resolve_data_config
pytorch-image-models/hfdocs/source/reference/data.mdx/0
{ "file_path": "pytorch-image-models/hfdocs/source/reference/data.mdx", "repo_id": "pytorch-image-models", "token_count": 67 }
208
import os from typing import Optional from .reader_image_folder import ReaderImageFolder from .reader_image_in_tar import ReaderImageInTar def create_reader( name: str, root: Optional[str] = None, split: str = 'train', **kwargs, ): kwargs = {k: v for k, v in kwargs.items() if v is...
pytorch-image-models/timm/data/readers/reader_factory.py/0
{ "file_path": "pytorch-image-models/timm/data/readers/reader_factory.py", "repo_id": "pytorch-image-models", "token_count": 694 }
209
""" PyTorch selectable adaptive pooling Adaptive pooling with the ability to select the type of pooling from: * 'avg' - Average pooling * 'max' - Max pooling * 'avgmax' - Sum of average and max pooling re-scaled by 0.5 * 'avgmaxc' - Concatenation of average and max pooling along feature dim, doubles fea...
pytorch-image-models/timm/layers/adaptive_avgmax_pool.py/0
{ "file_path": "pytorch-image-models/timm/layers/adaptive_avgmax_pool.py", "repo_id": "pytorch-image-models", "token_count": 3039 }
210
""" NormAct (Normalizaiton + Activation Layer) Factory Create norm + act combo modules that attempt to be backwards compatible with separate norm + act isntances in models. Where these are used it will be possible to swap separate BN + act layers with combined modules like IABN or EvoNorms. Hacked together by / Copyr...
pytorch-image-models/timm/layers/create_norm_act.py/0
{ "file_path": "pytorch-image-models/timm/layers/create_norm_act.py", "repo_id": "pytorch-image-models", "token_count": 1594 }
211
""" Lambda Layer Paper: `LambdaNetworks: Modeling Long-Range Interactions Without Attention` - https://arxiv.org/abs/2102.08602 @misc{2102.08602, Author = {Irwan Bello}, Title = {LambdaNetworks: Modeling Long-Range Interactions Without Attention}, Year = {2021}, } Status: This impl is a WIP. Code snippets in the...
pytorch-image-models/timm/layers/lambda_layer.py/0
{ "file_path": "pytorch-image-models/timm/layers/lambda_layer.py", "repo_id": "pytorch-image-models", "token_count": 2611 }
212
""" Sin-cos, fourier, rotary position embedding modules and functions Hacked together by / Copyright 2022 Ross Wightman """ import math from typing import List, Tuple, Optional, Union import torch from torch import nn as nn from .grid import ndgrid from .trace_utils import _assert def pixel_freq_bands( num...
pytorch-image-models/timm/layers/pos_embed_sincos.py/0
{ "file_path": "pytorch-image-models/timm/layers/pos_embed_sincos.py", "repo_id": "pytorch-image-models", "token_count": 7180 }
213
import torch import torch.nn as nn import torch.nn.functional as F from .cross_entropy import LabelSmoothingCrossEntropy class JsdCrossEntropy(nn.Module): """ Jensen-Shannon Divergence + Cross-Entropy Loss Based on impl here: https://github.com/google-research/augmix/blob/master/imagenet.py From paper: ...
pytorch-image-models/timm/loss/jsd.py/0
{ "file_path": "pytorch-image-models/timm/loss/jsd.py", "repo_id": "pytorch-image-models", "token_count": 639 }
214
""" Deep Layer Aggregation and DLA w/ Res2Net DLA original adapted from Official Pytorch impl at: https://github.com/ucbdrive/dla DLA Paper: `Deep Layer Aggregation` - https://arxiv.org/abs/1707.06484 Res2Net additions from: https://github.com/gasvn/Res2Net/ Res2Net Paper: `Res2Net: A New Multi-scale Backbone Architec...
pytorch-image-models/timm/models/dla.py/0
{ "file_path": "pytorch-image-models/timm/models/dla.py", "repo_id": "pytorch-image-models", "token_count": 9163 }
215
from functools import partial import torch.nn as nn from timm.data import IMAGENET_DEFAULT_MEAN, IMAGENET_DEFAULT_STD from ._builder import build_model_with_cfg from ._builder import pretrained_cfg_for_features from ._efficientnet_blocks import SqueezeExcite from ._efficientnet_builder import decode_arch_def, resolve...
pytorch-image-models/timm/models/hardcorenas.py/0
{ "file_path": "pytorch-image-models/timm/models/hardcorenas.py", "repo_id": "pytorch-image-models", "token_count": 4629 }
216
""" 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 Callable, List, Optional, Tuple, Union import to...
pytorch-image-models/timm/models/mobilenetv3.py/0
{ "file_path": "pytorch-image-models/timm/models/mobilenetv3.py", "repo_id": "pytorch-image-models", "token_count": 29761 }
217
""" ResNeSt Models Paper: `ResNeSt: Split-Attention Networks` - https://arxiv.org/abs/2004.08955 Adapted from original PyTorch impl w/ weights at https://github.com/zhanghang1989/ResNeSt by Hang Zhang Modified for torchscript compat, and consistency with timm by Ross Wightman """ from torch import nn from timm.data...
pytorch-image-models/timm/models/resnest.py/0
{ "file_path": "pytorch-image-models/timm/models/resnest.py", "repo_id": "pytorch-image-models", "token_count": 4439 }
218
""" Visformer Paper: Visformer: The Vision-friendly Transformer - https://arxiv.org/abs/2104.12533 From original at https://github.com/danczs/Visformer Modifications and additions for timm hacked together by / Copyright 2021, Ross Wightman """ import torch import torch.nn as nn from timm.data import IMAGENET_DEFAU...
pytorch-image-models/timm/models/visformer.py/0
{ "file_path": "pytorch-image-models/timm/models/visformer.py", "repo_id": "pytorch-image-models", "token_count": 10151 }
219
""" AdamW Optimizer Impl copied from PyTorch master NOTE: Builtin optim.AdamW is used by the factory, this impl only serves as a Python based reference, will be removed someday """ import math import torch from torch.optim.optimizer import Optimizer class AdamW(Optimizer): r"""Implements AdamW algorithm. Th...
pytorch-image-models/timm/optim/adamw.py/0
{ "file_path": "pytorch-image-models/timm/optim/adamw.py", "repo_id": "pytorch-image-models", "token_count": 2417 }
220
""" JIT scripting/tracing utils Hacked together by / Copyright 2020 Ross Wightman """ import os import torch def set_jit_legacy(): """ Set JIT executor to legacy w/ support for op fusion This is hopefully a temporary need in 1.5/1.5.1/1.6 to restore performance due to changes in the JIT exectutor. These...
pytorch-image-models/timm/utils/jit.py/0
{ "file_path": "pytorch-image-models/timm/utils/jit.py", "repo_id": "pytorch-image-models", "token_count": 1036 }
221
[workspace] members = [ "benchmark", "backends/v3", "backends/grpc-metadata", "backends/trtllm", "backends/client", "launcher" ] default-members = [ "benchmark", "backends/v3", "backends/grpc-metadata", # "backends/trtllm", "backends/client", "launcher" ] resolver = "2" [workspace.package] vers...
text-generation-inference/Cargo.toml/0
{ "file_path": "text-generation-inference/Cargo.toml", "repo_id": "text-generation-inference", "token_count": 434 }
222
#[allow(clippy::derive_partial_eq_without_eq)] mod pb; mod client; mod sharded_client; pub use client::Client; pub use pb::generate::v2::HealthResponse; pub use pb::generate::v2::{ Batch, CachedBatch, FinishReason, GeneratedText, Generation, GrammarType, InfoResponse, NextTokenChooserParameters, Request, Stop...
text-generation-inference/backends/client/src/v2/mod.rs/0
{ "file_path": "text-generation-inference/backends/client/src/v2/mod.rs", "repo_id": "text-generation-inference", "token_count": 134 }
223
use std::sync::Arc; use tokio::sync::{mpsc, oneshot}; use crate::radix::RadixAllocator; #[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 does not have to /// be recomputed. p...
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": 3020 }
224
/// 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 }
225
Documentation available at: https://huggingface.co/docs/text-generation-inference ## Release When making a release, please update the latest version in the documentation with: ``` export OLD_VERSION="2\.0\.3" export NEW_VERSION="2\.0\.4" find . -name '*.md' -exec sed -i -e "s/$OLD_VERSION/$NEW_VERSION/g" {} \; ```
text-generation-inference/docs/README.md/0
{ "file_path": "text-generation-inference/docs/README.md", "repo_id": "text-generation-inference", "token_count": 107 }
226
# Guidance ## What is Guidance? Guidance is a feature that allows users to constrain the generation of a large language model with a specified grammar. This feature is particularly useful when you want to generate text that follows a specific structure or uses a specific set of words or produce output in a specific f...
text-generation-inference/docs/source/conceptual/guidance.md/0
{ "file_path": "text-generation-inference/docs/source/conceptual/guidance.md", "repo_id": "text-generation-inference", "token_count": 1237 }
227
# HTTP API Reference #### Table of Contents - [Text Generation Inference custom API](#text-generation-inference-custom-api) - [OpenAI Messages API](#openai-messages-api) - [Making a Request](#making-a-request) - [Streaming](#streaming) - [Synchronous](#synchronous) - [Hugging Face Inference Endpoints](#huggin...
text-generation-inference/docs/source/reference/api_reference.md/0
{ "file_path": "text-generation-inference/docs/source/reference/api_reference.md", "repo_id": "text-generation-inference", "token_count": 1915 }
228
{ "choices": [ { "finish_reason": "stop", "index": 1, "logprobs": null, "text": " PR for more information?" }, { "finish_reason": "length", "index": 3, "logprobs": null, "text": "hd20220811-" }, { "finish_reason": "length", "index": 0, ...
text-generation-inference/integration-tests/models/__snapshots__/test_completion_prompts/test_flash_llama_completion_many_prompts.json/0
{ "file_path": "text-generation-inference/integration-tests/models/__snapshots__/test_completion_prompts/test_flash_llama_completion_many_prompts.json", "repo_id": "text-generation-inference", "token_count": 407 }
229
[ { "details": { "best_of_sequences": null, "finish_reason": "length", "generated_tokens": 10, "prefill": [ { "id": 2, "logprob": null, "text": "<bos>" }, { "id": 2015, "logprob": -10.0, "text": "Test" ...
text-generation-inference/integration-tests/models/__snapshots__/test_flash_gemma/test_flash_gemma_load.json/0
{ "file_path": "text-generation-inference/integration-tests/models/__snapshots__/test_flash_gemma/test_flash_gemma_load.json", "repo_id": "text-generation-inference", "token_count": 4916 }
230
[ { "details": { "best_of_sequences": null, "finish_reason": "length", "generated_tokens": 10, "prefill": [ { "id": 1, "logprob": null, "text": "<s>" }, { "id": 1724, "logprob": -10.734375, "text": "What" ...
text-generation-inference/integration-tests/models/__snapshots__/test_flash_medusa/test_flash_medusa_load.json/0
{ "file_path": "text-generation-inference/integration-tests/models/__snapshots__/test_flash_medusa/test_flash_medusa_load.json", "repo_id": "text-generation-inference", "token_count": 5726 }
231
{ "details": { "best_of_sequences": null, "finish_reason": "eos_token", "generated_tokens": 12, "prefill": [], "seed": null, "tokens": [ { "id": 450, "logprob": -0.26342773, "special": false, "text": " The" }, { "id": 21282, "lo...
text-generation-inference/integration-tests/models/__snapshots__/test_idefics/test_idefics_two_images.json/0
{ "file_path": "text-generation-inference/integration-tests/models/__snapshots__/test_idefics/test_idefics_two_images.json", "repo_id": "text-generation-inference", "token_count": 1028 }
232
{ "choices": [ { "finish_reason": "eos_token", "index": 0, "logprobs": null, "message": { "content": null, "name": null, "role": "assistant", "tool_calls": [ { "function": { "arguments": { "error": "Cannot ...
text-generation-inference/integration-tests/models/__snapshots__/test_tools_llama/test_flash_llama_grammar_tools_insufficient_information.json/0
{ "file_path": "text-generation-inference/integration-tests/models/__snapshots__/test_tools_llama/test_flash_llama_grammar_tools_insufficient_information.json", "repo_id": "text-generation-inference", "token_count": 487 }
233
import pytest @pytest.fixture(scope="module") def flash_llama_exl2_handle(launcher): with launcher( "turboderp/Llama-3-8B-Instruct-exl2", revision="2.5bpw", # Set max input length to avoid OOM due to extremely large # scratch buffer. max_input_length=1024, num_shard...
text-generation-inference/integration-tests/models/test_flash_llama_exl2.py/0
{ "file_path": "text-generation-inference/integration-tests/models/test_flash_llama_exl2.py", "repo_id": "text-generation-inference", "token_count": 886 }
234
import pytest import json from text_generation.types import GrammarType @pytest.fixture(scope="module") def non_flash_llama_grammar_handle(launcher): with launcher( "TinyLlama/TinyLlama-1.1B-Chat-v1.0", num_shard=1, disable_grammar_support=False, use_flash_attention=False, ) a...
text-generation-inference/integration-tests/models/test_grammar_llama.py/0
{ "file_path": "text-generation-inference/integration-tests/models/test_grammar_llama.py", "repo_id": "text-generation-inference", "token_count": 1346 }
235
[pytest] addopts = --snapshot-warn-unused asyncio_mode = auto markers = private: marks tests as requiring an admin hf token (deselect with '-m "not private"')
text-generation-inference/integration-tests/pytest.ini/0
{ "file_path": "text-generation-inference/integration-tests/pytest.ini", "repo_id": "text-generation-inference", "token_count": 58 }
236
#!/bin/bash if [[ -z "${HF_MODEL_ID}" ]]; then echo "HF_MODEL_ID must be set" exit 1 fi export MODEL_ID="${HF_MODEL_ID}" if [[ -n "${HF_MODEL_REVISION}" ]]; then export REVISION="${HF_MODEL_REVISION}" fi if [[ -n "${SM_NUM_GPUS}" ]]; then export NUM_SHARD="${SM_NUM_GPUS}" fi if [[ -n "${HF_MODEL_QUANTIZE}" ...
text-generation-inference/sagemaker-entrypoint.sh/0
{ "file_path": "text-generation-inference/sagemaker-entrypoint.sh", "repo_id": "text-generation-inference", "token_count": 239 }
237
from setuptools import setup from torch.utils.cpp_extension import BuildExtension, CUDAExtension extra_compile_args = ["-std=c++17"] setup( name="custom_kernels", ext_modules=[ CUDAExtension( name="custom_kernels.fused_bloom_attention_cuda", sources=["custom_kernels/fused_bloom...
text-generation-inference/server/custom_kernels/setup.py/0
{ "file_path": "text-generation-inference/server/custom_kernels/setup.py", "repo_id": "text-generation-inference", "token_count": 309 }
238
#ifndef _config_h #define _config_h #define MAX_Q_GEMM_ROWS 50 #define MAX_Q_GEMM_WEIGHTS 4 // must be <= MAX_Q_GEMM_ROWS #define QMODE_2BIT 1 #define QMODE_3BIT 1 #define QMODE_4BIT 1 #define QMODE_5BIT 1 #define QMODE_6BIT 0 #define QMODE_8BIT 0 #endif
text-generation-inference/server/exllamav2_kernels/exllamav2_kernels/config.h/0
{ "file_path": "text-generation-inference/server/exllamav2_kernels/exllamav2_kernels/config.h", "repo_id": "text-generation-inference", "token_count": 119 }
239
#ifndef _qdq_util_cuh #define _qdq_util_cuh union half2_uint32 { uint32_t as_uint32; half2 as_half2; __device__ half2_uint32(uint32_t val) : as_uint32(val) {} __device__ half2_uint32(half2 val) : as_half2(val) {} __device__ half2_uint32() : as_uint32(0) {} }; union half_uint16 { uint16_t as_ui...
text-generation-inference/server/exllamav2_kernels/exllamav2_kernels/cuda/quant/qdq_util.cuh/0
{ "file_path": "text-generation-inference/server/exllamav2_kernels/exllamav2_kernels/cuda/quant/qdq_util.cuh", "repo_id": "text-generation-inference", "token_count": 602 }
240
from text_generation_server.utils.hub import ( download_weights, weight_hub_files, weight_files, ) from text_generation_server.utils.convert import convert_files def test_convert_files(): model_id = "bigscience/bloom-560m" pt_filenames = weight_hub_files(model_id, extension=".bin") local_pt_f...
text-generation-inference/server/tests/utils/test_convert.py/0
{ "file_path": "text-generation-inference/server/tests/utils/test_convert.py", "repo_id": "text-generation-inference", "token_count": 259 }
241
from dataclasses import dataclass from text_generation_server.models.globals import ATTENTION import torch from typing import Optional if ATTENTION in {"flashinfer", "flashdecoding"}: @dataclass class Seqlen: input_lengths: torch.Tensor prefix_lengths: torch.Tensor cu_seqlen_q: Option...
text-generation-inference/server/text_generation_server/layers/attention/common.py/0
{ "file_path": "text-generation-inference/server/text_generation_server/layers/attention/common.py", "repo_id": "text-generation-inference", "token_count": 1117 }
242
# Adapted from turboderp exllama: https://github.com/turboderp/exllamav2 from dataclasses import dataclass from typing import Optional import torch import torch.nn as nn from loguru import logger from text_generation_server.layers.exl2 import Exl2Weight from text_generation_server.layers.gptq import GPTQWeight from ...
text-generation-inference/server/text_generation_server/layers/gptq/exllamav2.py/0
{ "file_path": "text-generation-inference/server/text_generation_server/layers/gptq/exllamav2.py", "repo_id": "text-generation-inference", "token_count": 3935 }
243
import torch from torch.nn import functional as F from typing import Iterable, List from text_generation_server.layers.linear import get_linear, FastLinear from text_generation_server.utils.import_utils import SYSTEM if SYSTEM == "ipex": import intel_extension_for_pytorch as ipex class LayerConcat(torch.nn.Modul...
text-generation-inference/server/text_generation_server/layers/tensor_parallel.py/0
{ "file_path": "text-generation-inference/server/text_generation_server/layers/tensor_parallel.py", "repo_id": "text-generation-inference", "token_count": 4175 }
244
# 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/server/text_generation_server/models/custom_modeling/flash_mixtral_modeling.py/0
{ "file_path": "text-generation-inference/server/text_generation_server/models/custom_modeling/flash_mixtral_modeling.py", "repo_id": "text-generation-inference", "token_count": 10569 }
245
import torch import torch.distributed from mamba_ssm.ops.triton.selective_state_update import selective_state_update from mamba_ssm.ops.selective_scan_interface import selective_scan_fn from torch import nn from typing import Optional, Tuple, Any from transformers.configuration_utils import PretrainedConfig import tor...
text-generation-inference/server/text_generation_server/models/custom_modeling/mamba_modeling.py/0
{ "file_path": "text-generation-inference/server/text_generation_server/models/custom_modeling/mamba_modeling.py", "repo_id": "text-generation-inference", "token_count": 4108 }
246
import torch import torch.distributed import time from dataclasses import dataclass from opentelemetry import trace from transformers import ( AutoTokenizer, AutoModelForSeq2SeqLM, PreTrainedTokenizerBase, AutoConfig, ) from typing import Optional, Tuple, List, Type, Dict from text_generation_server.uti...
text-generation-inference/server/text_generation_server/models/seq2seq_lm.py/0
{ "file_path": "text-generation-inference/server/text_generation_server/models/seq2seq_lm.py", "repo_id": "text-generation-inference", "token_count": 17934 }
247
# coding=utf-8 # From: https://github.com/huggingface/peft/pull/1364 # Copyright 2024-present the HuggingFace Inc. team. # Modifications by Predibase, 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 th...
text-generation-inference/server/text_generation_server/utils/merges/utils.py/0
{ "file_path": "text-generation-inference/server/text_generation_server/utils/merges/utils.py", "repo_id": "text-generation-inference", "token_count": 1422 }
248
{ "name": "tokenizers-win32-arm64-msvc", "version": "0.13.4-rc1", "os": [ "win32" ], "cpu": [ "arm64" ], "main": "tokenizers.win32-arm64-msvc.node", "files": [ "tokenizers.win32-arm64-msvc.node" ], "description": "Tokenizers platform specific bindings", "keywords": [ "napi-rs", ...
tokenizers/bindings/node/npm/win32-arm64-msvc/package.json/0
{ "file_path": "tokenizers/bindings/node/npm/win32-arm64-msvc/package.json", "repo_id": "tokenizers", "token_count": 277 }
249
extern crate tokenizers as tk; use crate::models::Model; use napi::bindgen_prelude::*; use std::sync::{Arc, RwLock}; use tokenizers::models::bpe::{BpeBuilder, BPE}; use tokenizers::models::wordlevel::{WordLevel, WordLevelBuilder}; use tokenizers::models::wordpiece::{WordPiece, WordPieceBuilder}; pub struct BPEFromFil...
tokenizers/bindings/node/src/tasks/models.rs/0
{ "file_path": "tokenizers/bindings/node/src/tasks/models.rs", "repo_id": "tokenizers", "token_count": 800 }
250