This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
""" | |
Transfer Learning for Computer Vision Tutorial | |
============================================== | |
**Author**: `Sasank Chilamkurthy <https://chsasank.github.io>`_ | |
In this tutorial, you will learn how to train a convolutional neural network for | |
image classification using transfer learning. You can read more about the transfer | |
learning at `cs231n notes <https://cs231n.github.io/transfer-learning/>`__ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
`Learn the Basics <intro.html>`_ || | |
**Quickstart** || | |
`Tensors <tensorqs_tutorial.html>`_ || | |
`Datasets & DataLoaders <data_tutorial.html>`_ || | |
`Transforms <transforms_tutorial.html>`_ || | |
`Build Model <buildmodel_tutorial.html>`_ || | |
`Autograd <autogradqs_tutorial.html>`_ || | |
`Optimization <optimization_tutorial.html>`_ || | |
`Save & Load Model <saveloadrun_tutorial.html>`_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from transformers import AutoTokenizer, AutoModelForCausalLM | |
import os | |
import random | |
import numpy as np | |
import torch | |
def set_all_seeds(seed): | |
random.seed(seed) | |
np.random.seed(seed) | |
torch.manual_seed(seed) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Making all in config | |
make[1]: Entering directory '/home/lili/openmpi-5.0.0/config' | |
make[1]: Nothing to be done for 'all'. | |
make[1]: Leaving directory '/home/lili/openmpi-5.0.0/config' | |
Making all in contrib | |
make[1]: Entering directory '/home/lili/openmpi-5.0.0/contrib' | |
make[1]: Nothing to be done for 'all'. | |
make[1]: Leaving directory '/home/lili/openmpi-5.0.0/contrib' | |
Making all in 3rd-party | |
make[1]: Entering directory '/home/lili/openmpi-5.0.0/3rd-party' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ pmix_info | |
Package: PMIx [email protected] Distribution | |
PMIX: 4.2.7a1 | |
PMIX repo revision: v4.2.7 | |
PMIX release date: Unreleased developer copy | |
PMIX Standard: 4.2 | |
PMIX Standard ABI: Stable (0.0), Provisional (0.0) | |
Prefix: /usr/local | |
Configured architecture: pmix.arch | |
Configure host: u-gpu-a100-01.ai.test.ten |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
============================================================================ | |
== Configuring Open MPI | |
============================================================================ | |
*** Prerequisites | |
checking for a sed that does not truncate output... /usr/bin/sed | |
checking for perl... perl | |
*** Startup tests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/llama_recipes/configs/datasets.py b/src/llama_recipes/configs/datasets.py | |
index 62230e4..3e4c76f 100644 | |
--- a/src/llama_recipes/configs/datasets.py | |
+++ b/src/llama_recipes/configs/datasets.py | |
@@ -15,8 +15,8 @@ class samsum_dataset: | |
@dataclass | |
class grammar_dataset: | |
dataset: str = "grammar_dataset" | |
- train_split: str = "src/llama_recipes/datasets/grammar_dataset/gtrain_10k.csv" | |
- test_split: str = "src/llama_recipes/datasets/grammar_dataset/grammar_validation.csv" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import tensorflow as tf | |
from tensor2tensor import models | |
from tensor2tensor import problems | |
from tensor2tensor.utils import trainer_lib | |
from tensor2tensor.utils import t2t_model | |
from tensor2tensor.utils import registry | |
from tensor2tensor.utils.trainer_lib import create_hparams | |
import os | |
import numpy as np |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import sys | |
import numpy as np | |
import collections | |
import matplotlib.pyplot as plt# Colab-only TensorFlow version selector | |
import tensorflow as tf | |
from tensor2tensor import models | |
from tensor2tensor import problems | |
from tensor2tensor.layers import common_layers | |
from tensor2tensor.utils import trainer_lib |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/infer.py b/infer.py | |
index 3f31004..ec15d47 100644 | |
--- a/infer.py | |
+++ b/infer.py | |
@@ -63,7 +63,8 @@ def infer(args): | |
dev_count = 1 | |
gpu_id = 0 | |
phase = "test" | |
- place = fluid.CUDAPlace(gpu_id) | |
+ #place = fluid.CUDAPlace(gpu_id) |
NewerOlder