text stringlengths 7 318k | id stringlengths 14 166 | metadata dict | __index_level_0__ int64 0 439 |
|---|---|---|---|
<!--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... | accelerate/docs/source/basic_tutorials/troubleshooting.md/0 | {
"file_path": "accelerate/docs/source/basic_tutorials/troubleshooting.md",
"repo_id": "accelerate",
"token_count": 2832
} | 0 |
<!--Copyright 2022 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... | accelerate/docs/source/usage_guides/ipex.md/0 | {
"file_path": "accelerate/docs/source/usage_guides/ipex.md",
"repo_id": "accelerate",
"token_count": 2313
} | 1 |
import argparse
import runhouse as rh
import torch
from nlp_example import training_function
from accelerate.utils import PrepareForLaunch, patch_environment
def launch_train(*args):
num_processes = torch.cuda.device_count()
print(f"Device count: {num_processes}")
with patch_environment(
world_s... | accelerate/examples/multigpu_remote_launcher.py/0 | {
"file_path": "accelerate/examples/multigpu_remote_launcher.py",
"repo_id": "accelerate",
"token_count": 869
} | 2 |
# Copyright 2022 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... | accelerate/src/accelerate/checkpointing.py/0 | {
"file_path": "accelerate/src/accelerate/checkpointing.py",
"repo_id": "accelerate",
"token_count": 4641
} | 3 |
# Copyright 2022 The HuggingFace Team and Brian Chao. 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... | accelerate/src/accelerate/commands/menu/helpers.py/0 | {
"file_path": "accelerate/src/accelerate/commands/menu/helpers.py",
"repo_id": "accelerate",
"token_count": 505
} | 4 |
#!/usr/bin/env python
# Copyright 2022 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
#
# Unles... | accelerate/src/accelerate/test_utils/examples.py/0 | {
"file_path": "accelerate/src/accelerate/test_utils/examples.py",
"repo_id": "accelerate",
"token_count": 2747
} | 5 |
from .constants import (
MODEL_NAME,
OPTIMIZER_NAME,
RNG_STATE_NAME,
SAFE_MODEL_NAME,
SAFE_WEIGHTS_INDEX_NAME,
SAFE_WEIGHTS_NAME,
SAMPLER_NAME,
SCALER_NAME,
SCHEDULER_NAME,
TORCH_DISTRIBUTED_OPERATION_TYPES,
TORCH_LAUNCH_PARAMS,
WEIGHTS_INDEX_NAME,
WEIGHTS_NAME,
)
fro... | accelerate/src/accelerate/utils/__init__.py/0 | {
"file_path": "accelerate/src/accelerate/utils/__init__.py",
"repo_id": "accelerate",
"token_count": 2193
} | 6 |
compute_environment: LOCAL_MACHINE
deepspeed_config: {}
distributed_type: 'NO'
downcast_bf16: 'no'
fsdp_config: {}
gpu_ids: all
machine_rank: 0
main_process_ip: null
main_process_port: null
main_training_function: main
megatron_lm_config: {}
mixed_precision: 'no'
num_machines: 1
num_processes: 1
rdzv_backend: static
sa... | accelerate/tests/test_configs/latest.yaml/0 | {
"file_path": "accelerate/tests/test_configs/latest.yaml",
"repo_id": "accelerate",
"token_count": 186
} | 7 |
#!/usr/bin/env python
# coding=utf-8
# Copyright 2023 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/LI... | alignment-handbook/scripts/run_dpo.py/0 | {
"file_path": "alignment-handbook/scripts/run_dpo.py",
"repo_id": "alignment-handbook",
"token_count": 3365
} | 8 |
# Creating apps
| candle/candle-book/src/apps/README.md/0 | {
"file_path": "candle/candle-book/src/apps/README.md",
"repo_id": "candle",
"token_count": 4
} | 9 |
# Running a model
In order to run an existing model, you will need to download and use existing weights.
Most models are already available on https://huggingface.co/ in [`safetensors`](https://github.com/huggingface/safetensors) format.
Let's get started by running an old model : `bert-base-uncased`.
| candle/candle-book/src/inference/inference.md/0 | {
"file_path": "candle/candle-book/src/inference/inference.md",
"repo_id": "candle",
"token_count": 88
} | 10 |
use crate::benchmarks::{BenchDevice, BenchDeviceHandler};
use candle_core::{DType, Device, Tensor};
use criterion::{black_box, criterion_group, Criterion, Throughput};
use std::time::Instant;
fn run(a: &Tensor, b: &Tensor, c: &Tensor) {
a.where_cond(b, c).unwrap();
}
const fn create_cond_arr<const N: usize>() -> ... | candle/candle-core/benches/benchmarks/where_cond.rs/0 | {
"file_path": "candle/candle-core/benches/benchmarks/where_cond.rs",
"repo_id": "candle",
"token_count": 942
} | 11 |
use crate::backend::{BackendDevice, BackendStorage};
use crate::op::{BinaryOpT, CmpOp, ReduceOp, UnaryOpT};
use crate::{DType, Error, IntDType, Layout, Result, Shape, WithDType};
use half::{bf16, f16};
use rayon::prelude::*;
const USE_IM2COL_CONV1D: bool = true;
const USE_IM2COL_CONV2D: bool = true;
// TODO: Maybe we... | candle/candle-core/src/cpu_backend.rs/0 | {
"file_path": "candle/candle-core/src/cpu_backend.rs",
"repo_id": "candle",
"token_count": 68866
} | 12 |
End of preview. Expand in Data Studio
README.md exists but content is empty.
- Downloads last month
- 34