file_path
stringlengths
3
280
file_language
stringclasses
66 values
content
stringlengths
1
1.04M
repo_name
stringlengths
5
92
repo_stars
int64
0
154k
repo_description
stringlengths
0
402
repo_primary_language
stringclasses
108 values
developer_username
stringlengths
1
25
developer_name
stringlengths
0
30
developer_company
stringlengths
0
82
streaming/src/runtime_context.h
C/C++ Header
#ifndef RAY_STREAMING_H #define RAY_STREAMING_H #include <string> #include "config/streaming_config.h" #include "status.h" namespace ray { namespace streaming { enum class RuntimeStatus : uint8_t { Init = 0, Running = 1, Interrupted = 2 }; #define RETURN_IF_NOT_OK(STATUS_EXP) \ { ...
zhuohan123/hoplite-rllib
3
Python
zhuohan123
Zhuohan Li
vLLM / Meta
streaming/src/status.h
C/C++ Header
#ifndef RAY_STREAMING_STATUS_H #define RAY_STREAMING_STATUS_H #include <ostream> #include <sstream> #include <string> namespace ray { namespace streaming { enum class StreamingStatus : uint32_t { OK = 0, ReconstructTimeOut = 1, QueueIdNotFound = 3, ResubscribeFailed = 4, EmptyRingBuffer = 5, FullChannel =...
zhuohan123/hoplite-rllib
3
Python
zhuohan123
Zhuohan Li
vLLM / Meta
streaming/src/test/message_serialization_tests.cc
C++
#include <cstring> #include <string> #include "gtest/gtest.h" #include "message/message.h" #include "message/message_bundle.h" using namespace ray; using namespace ray::streaming; TEST(StreamingSerializationTest, streaming_message_serialization_test) { uint8_t data[] = {9, 1, 3}; StreamingMessagePtr message = ...
zhuohan123/hoplite-rllib
3
Python
zhuohan123
Zhuohan Li
vLLM / Meta
streaming/src/test/mock_actor.cc
C++
#define BOOST_BIND_NO_PLACEHOLDERS #include "ray/core_worker/context.h" #include "ray/core_worker/core_worker.h" #include "src/ray/util/test_util.h" #include "data_reader.h" #include "data_writer.h" #include "message/message.h" #include "message/message_bundle.h" #include "queue/queue_client.h" #include "ring_buffer.h...
zhuohan123/hoplite-rllib
3
Python
zhuohan123
Zhuohan Li
vLLM / Meta
streaming/src/test/mock_transfer_tests.cc
C++
#include "data_reader.h" #include "data_writer.h" #include "gtest/gtest.h" using namespace ray; using namespace ray::streaming; TEST(StreamingMockTransfer, mock_produce_consume) { std::shared_ptr<Config> transfer_config; ObjectID channel_id = ObjectID::FromRandom(); ProducerChannelInfo producer_channel_info; ...
zhuohan123/hoplite-rllib
3
Python
zhuohan123
Zhuohan Li
vLLM / Meta
streaming/src/test/queue_tests_base.h
C/C++ Header
namespace ray { namespace streaming { ray::ObjectID RandomObjectID() { return ObjectID::FromRandom(); } static void flushall_redis(void) { redisContext *context = redisConnect("127.0.0.1", 6379); freeReplyObject(redisCommand(context, "FLUSHALL")); freeReplyObject(redisCommand(context, "SET NumRedisShards 1")); ...
zhuohan123/hoplite-rllib
3
Python
zhuohan123
Zhuohan Li
vLLM / Meta
streaming/src/test/ring_buffer_tests.cc
C++
#include "gtest/gtest.h" #include "ray/util/logging.h" #include <unistd.h> #include <iostream> #include <set> #include <thread> #include "message/message.h" #include "ring_buffer.h" using namespace ray; using namespace ray::streaming; size_t data_n = 1000000; TEST(StreamingRingBufferTest, streaming_message_ring_buff...
zhuohan123/hoplite-rllib
3
Python
zhuohan123
Zhuohan Li
vLLM / Meta
streaming/src/test/run_streaming_queue_test.sh
Shell
#!/usr/bin/env bash # Run all streaming c++ tests using streaming queue, instead of plasma queue # This needs to be run in the root directory. # Try to find an unused port for raylet to use. PORTS="2000 2001 2002 2003 2004 2005 2006 2007 2008 2009" RAYLET_PORT=0 for port in $PORTS; do nc -z localhost $port if...
zhuohan123/hoplite-rllib
3
Python
zhuohan123
Zhuohan Li
vLLM / Meta
streaming/src/test/streaming_queue_tests.cc
C++
#define BOOST_BIND_NO_PLACEHOLDERS #include <unistd.h> #include "gtest/gtest.h" #include "queue/queue_client.h" #include "ray/core_worker/core_worker.h" #include "data_reader.h" #include "data_writer.h" #include "message/message.h" #include "message/message_bundle.h" #include "ring_buffer.h" #include "queue_tests_bas...
zhuohan123/hoplite-rllib
3
Python
zhuohan123
Zhuohan Li
vLLM / Meta
streaming/src/test/streaming_util_tests.cc
C++
#include "gtest/gtest.h" #include "util/streaming_util.h" using namespace ray; using namespace ray::streaming; TEST(StreamingUtilTest, test_Byte2hex) { const uint8_t data[2] = {0x11, 0x07}; EXPECT_TRUE(Util::Byte2hex(data, 2) == "1107"); EXPECT_TRUE(Util::Byte2hex(data, 2) != "1108"); } TEST(StreamingUtilTest...
zhuohan123/hoplite-rllib
3
Python
zhuohan123
Zhuohan Li
vLLM / Meta
streaming/src/util/streaming_logging.cc
C++
#include <sys/stat.h> #include <sys/types.h> #include <unistd.h> #include "streaming_logging.h" namespace ray { namespace streaming {} // namespace streaming } // namespace ray
zhuohan123/hoplite-rllib
3
Python
zhuohan123
Zhuohan Li
vLLM / Meta
streaming/src/util/streaming_logging.h
C/C++ Header
#ifndef RAY_STREAMING_LOGGING_H #define RAY_STREAMING_LOGGING_H #include "ray/util/logging.h" #define STREAMING_LOG RAY_LOG #define STREAMING_CHECK RAY_CHECK namespace ray { namespace streaming {} // namespace streaming } // namespace ray #endif // RAY_STREAMING_LOGGING_H
zhuohan123/hoplite-rllib
3
Python
zhuohan123
Zhuohan Li
vLLM / Meta
streaming/src/util/streaming_util.cc
C++
#include <unordered_set> #include "streaming_util.h" namespace ray { namespace streaming { boost::any &Config::Get(ConfigEnum key) const { auto item = config_map_.find(key); STREAMING_CHECK(item != config_map_.end()); return item->second; } boost::any Config::Get(ConfigEnum key, boost::any default_value) const...
zhuohan123/hoplite-rllib
3
Python
zhuohan123
Zhuohan Li
vLLM / Meta
streaming/src/util/streaming_util.h
C/C++ Header
#ifndef RAY_STREAMING_UTIL_H #define RAY_STREAMING_UTIL_H #include <boost/any.hpp> #include <string> #include <unordered_map> #include "util/streaming_logging.h" namespace ray { namespace streaming { enum class ConfigEnum : uint32_t { QUEUE_ID_VECTOR = 0, RECONSTRUCT_RETRY_TIMES, RECONSTRUCT_TIMEOUT_PER_MB, ...
zhuohan123/hoplite-rllib
3
Python
zhuohan123
Zhuohan Li
vLLM / Meta
bert/distributed_train.py
Python
#!/usr/bin/env python3 -u # Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. import o...
zhuohan123/macaron-net
147
Codes for "Understanding and Improving Transformer From a Multi-Particle Dynamic System Point of View"
Python
zhuohan123
Zhuohan Li
vLLM / Meta
bert/eval_lm.py
Python
#!/usr/bin/env python3 -u # Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. """ Evalu...
zhuohan123/macaron-net
147
Codes for "Understanding and Improving Transformer From a Multi-Particle Dynamic System Point of View"
Python
zhuohan123
Zhuohan Li
vLLM / Meta
bert/fairseq/__init__.py
Python
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. from .multiprocessing_pdb import p...
zhuohan123/macaron-net
147
Codes for "Understanding and Improving Transformer From a Multi-Particle Dynamic System Point of View"
Python
zhuohan123
Zhuohan Li
vLLM / Meta
bert/fairseq/bleu.py
Python
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. import ctypes import math import t...
zhuohan123/macaron-net
147
Codes for "Understanding and Improving Transformer From a Multi-Particle Dynamic System Point of View"
Python
zhuohan123
Zhuohan Li
vLLM / Meta
bert/fairseq/clib/libbleu/libbleu.cpp
C++
/** * Copyright 2017-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the license found in the * LICENSE file in the root directory of this source tree. */ #include <map> #include <array> #include <cstring> #include <cstdio> typedef struct { size_t reflen; size_t pre...
zhuohan123/macaron-net
147
Codes for "Understanding and Improving Transformer From a Multi-Particle Dynamic System Point of View"
Python
zhuohan123
Zhuohan Li
vLLM / Meta
bert/fairseq/clib/libbleu/module.cpp
C++
/** * Copyright 2017-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the license found in the * LICENSE file in the root directory of this source tree. */ #include <Python.h> static PyMethodDef method_def[] = { {NULL, NULL, 0, NULL} }; static struct PyModuleDef module_d...
zhuohan123/macaron-net
147
Codes for "Understanding and Improving Transformer From a Multi-Particle Dynamic System Point of View"
Python
zhuohan123
Zhuohan Li
vLLM / Meta
bert/fairseq/criterions/__init__.py
Python
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. import importlib import os from ....
zhuohan123/macaron-net
147
Codes for "Understanding and Improving Transformer From a Multi-Particle Dynamic System Point of View"
Python
zhuohan123
Zhuohan Li
vLLM / Meta
bert/fairseq/criterions/adaptive_loss.py
Python
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. import math import torch.nn.funct...
zhuohan123/macaron-net
147
Codes for "Understanding and Improving Transformer From a Multi-Particle Dynamic System Point of View"
Python
zhuohan123
Zhuohan Li
vLLM / Meta
bert/fairseq/criterions/cross_entropy.py
Python
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. import math import torch.nn.functi...
zhuohan123/macaron-net
147
Codes for "Understanding and Improving Transformer From a Multi-Particle Dynamic System Point of View"
Python
zhuohan123
Zhuohan Li
vLLM / Meta
bert/fairseq/criterions/cross_entropy_bert.py
Python
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. import math import torch.nn.functi...
zhuohan123/macaron-net
147
Codes for "Understanding and Improving Transformer From a Multi-Particle Dynamic System Point of View"
Python
zhuohan123
Zhuohan Li
vLLM / Meta
bert/fairseq/criterions/cross_entropy_classify.py
Python
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. import torch.nn.functional as F f...
zhuohan123/macaron-net
147
Codes for "Understanding and Improving Transformer From a Multi-Particle Dynamic System Point of View"
Python
zhuohan123
Zhuohan Li
vLLM / Meta
bert/fairseq/criterions/cross_entropy_classify_binary.py
Python
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. import torch.nn.functional as F f...
zhuohan123/macaron-net
147
Codes for "Understanding and Improving Transformer From a Multi-Particle Dynamic System Point of View"
Python
zhuohan123
Zhuohan Li
vLLM / Meta
bert/fairseq/criterions/fairseq_criterion.py
Python
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. from torch.nn.modules.loss import ...
zhuohan123/macaron-net
147
Codes for "Understanding and Improving Transformer From a Multi-Particle Dynamic System Point of View"
Python
zhuohan123
Zhuohan Li
vLLM / Meta
bert/fairseq/criterions/label_smoothed_cross_entropy.py
Python
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. import math from fairseq import u...
zhuohan123/macaron-net
147
Codes for "Understanding and Improving Transformer From a Multi-Particle Dynamic System Point of View"
Python
zhuohan123
Zhuohan Li
vLLM / Meta
bert/fairseq/criterions/mean_squared_error.py
Python
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. import torch.nn.functional as F im...
zhuohan123/macaron-net
147
Codes for "Understanding and Improving Transformer From a Multi-Particle Dynamic System Point of View"
Python
zhuohan123
Zhuohan Li
vLLM / Meta
bert/fairseq/data/__init__.py
Python
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. from .dictionary import Dictionary...
zhuohan123/macaron-net
147
Codes for "Understanding and Improving Transformer From a Multi-Particle Dynamic System Point of View"
Python
zhuohan123
Zhuohan Li
vLLM / Meta
bert/fairseq/data/backtranslation_dataset.py
Python
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. from fairseq import sequence_gene...
zhuohan123/macaron-net
147
Codes for "Understanding and Improving Transformer From a Multi-Particle Dynamic System Point of View"
Python
zhuohan123
Zhuohan Li
vLLM / Meta
bert/fairseq/data/bert_dataset.py
Python
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. import numpy as np import torch f...
zhuohan123/macaron-net
147
Codes for "Understanding and Improving Transformer From a Multi-Particle Dynamic System Point of View"
Python
zhuohan123
Zhuohan Li
vLLM / Meta
bert/fairseq/data/data_utils.py
Python
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. import contextlib import os impor...
zhuohan123/macaron-net
147
Codes for "Understanding and Improving Transformer From a Multi-Particle Dynamic System Point of View"
Python
zhuohan123
Zhuohan Li
vLLM / Meta
bert/fairseq/data/dictionary.py
Python
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. from collections import Counter im...
zhuohan123/macaron-net
147
Codes for "Understanding and Improving Transformer From a Multi-Particle Dynamic System Point of View"
Python
zhuohan123
Zhuohan Li
vLLM / Meta
bert/fairseq/data/fairseq_dataset.py
Python
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. import torch.utils.data from fair...
zhuohan123/macaron-net
147
Codes for "Understanding and Improving Transformer From a Multi-Particle Dynamic System Point of View"
Python
zhuohan123
Zhuohan Li
vLLM / Meta
bert/fairseq/data/glue_dataset.py
Python
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. import numpy as np import torch f...
zhuohan123/macaron-net
147
Codes for "Understanding and Improving Transformer From a Multi-Particle Dynamic System Point of View"
Python
zhuohan123
Zhuohan Li
vLLM / Meta
bert/fairseq/data/indexed_dataset.py
Python
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. import os import struct import nu...
zhuohan123/macaron-net
147
Codes for "Understanding and Improving Transformer From a Multi-Particle Dynamic System Point of View"
Python
zhuohan123
Zhuohan Li
vLLM / Meta
bert/fairseq/data/iterators.py
Python
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. import itertools import math impo...
zhuohan123/macaron-net
147
Codes for "Understanding and Improving Transformer From a Multi-Particle Dynamic System Point of View"
Python
zhuohan123
Zhuohan Li
vLLM / Meta
bert/fairseq/data/language_pair_dataset.py
Python
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. import numpy as np import torch f...
zhuohan123/macaron-net
147
Codes for "Understanding and Improving Transformer From a Multi-Particle Dynamic System Point of View"
Python
zhuohan123
Zhuohan Li
vLLM / Meta
bert/fairseq/data/monolingual_dataset.py
Python
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. import numpy as np import torch f...
zhuohan123/macaron-net
147
Codes for "Understanding and Improving Transformer From a Multi-Particle Dynamic System Point of View"
Python
zhuohan123
Zhuohan Li
vLLM / Meta
bert/fairseq/data/token_block_dataset.py
Python
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. import math import numpy as np im...
zhuohan123/macaron-net
147
Codes for "Understanding and Improving Transformer From a Multi-Particle Dynamic System Point of View"
Python
zhuohan123
Zhuohan Li
vLLM / Meta
bert/fairseq/distributed_utils.py
Python
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. from collections import namedtuple...
zhuohan123/macaron-net
147
Codes for "Understanding and Improving Transformer From a Multi-Particle Dynamic System Point of View"
Python
zhuohan123
Zhuohan Li
vLLM / Meta
bert/fairseq/meters.py
Python
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. import time class AverageMeter(o...
zhuohan123/macaron-net
147
Codes for "Understanding and Improving Transformer From a Multi-Particle Dynamic System Point of View"
Python
zhuohan123
Zhuohan Li
vLLM / Meta
bert/fairseq/models/__init__.py
Python
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. import argparse import importlib i...
zhuohan123/macaron-net
147
Codes for "Understanding and Improving Transformer From a Multi-Particle Dynamic System Point of View"
Python
zhuohan123
Zhuohan Li
vLLM / Meta
bert/fairseq/models/composite_encoder.py
Python
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. from . import FairseqEncoder cla...
zhuohan123/macaron-net
147
Codes for "Understanding and Improving Transformer From a Multi-Particle Dynamic System Point of View"
Python
zhuohan123
Zhuohan Li
vLLM / Meta
bert/fairseq/models/distributed_fairseq_model.py
Python
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. from torch.nn import parallel fro...
zhuohan123/macaron-net
147
Codes for "Understanding and Improving Transformer From a Multi-Particle Dynamic System Point of View"
Python
zhuohan123
Zhuohan Li
vLLM / Meta
bert/fairseq/models/fairseq_decoder.py
Python
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. import torch.nn as nn import torch...
zhuohan123/macaron-net
147
Codes for "Understanding and Improving Transformer From a Multi-Particle Dynamic System Point of View"
Python
zhuohan123
Zhuohan Li
vLLM / Meta
bert/fairseq/models/fairseq_encoder.py
Python
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. import torch.nn as nn class Fair...
zhuohan123/macaron-net
147
Codes for "Understanding and Improving Transformer From a Multi-Particle Dynamic System Point of View"
Python
zhuohan123
Zhuohan Li
vLLM / Meta
bert/fairseq/models/fairseq_incremental_decoder.py
Python
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. from . import FairseqDecoder cla...
zhuohan123/macaron-net
147
Codes for "Understanding and Improving Transformer From a Multi-Particle Dynamic System Point of View"
Python
zhuohan123
Zhuohan Li
vLLM / Meta
bert/fairseq/models/fairseq_model.py
Python
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. import torch import torch.nn as nn...
zhuohan123/macaron-net
147
Codes for "Understanding and Improving Transformer From a Multi-Particle Dynamic System Point of View"
Python
zhuohan123
Zhuohan Li
vLLM / Meta
bert/fairseq/models/fconv.py
Python
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. import math import torch import to...
zhuohan123/macaron-net
147
Codes for "Understanding and Improving Transformer From a Multi-Particle Dynamic System Point of View"
Python
zhuohan123
Zhuohan Li
vLLM / Meta
bert/fairseq/models/fconv_self_att.py
Python
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. # import math import torch import...
zhuohan123/macaron-net
147
Codes for "Understanding and Improving Transformer From a Multi-Particle Dynamic System Point of View"
Python
zhuohan123
Zhuohan Li
vLLM / Meta
bert/fairseq/models/lstm.py
Python
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. import torch import torch.nn as nn...
zhuohan123/macaron-net
147
Codes for "Understanding and Improving Transformer From a Multi-Particle Dynamic System Point of View"
Python
zhuohan123
Zhuohan Li
vLLM / Meta
bert/fairseq/models/transformer.py
Python
# Modified by Zhuohan Li in May 2019 for macaron-net # # Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in ...
zhuohan123/macaron-net
147
Codes for "Understanding and Improving Transformer From a Multi-Particle Dynamic System Point of View"
Python
zhuohan123
Zhuohan Li
vLLM / Meta
bert/fairseq/modules/__init__.py
Python
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. from .adaptive_softmax import Adap...
zhuohan123/macaron-net
147
Codes for "Understanding and Improving Transformer From a Multi-Particle Dynamic System Point of View"
Python
zhuohan123
Zhuohan Li
vLLM / Meta
bert/fairseq/modules/adaptive_softmax.py
Python
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. import torch import torch.nn.func...
zhuohan123/macaron-net
147
Codes for "Understanding and Improving Transformer From a Multi-Particle Dynamic System Point of View"
Python
zhuohan123
Zhuohan Li
vLLM / Meta
bert/fairseq/modules/beamable_mm.py
Python
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. import torch import torch.nn as nn...
zhuohan123/macaron-net
147
Codes for "Understanding and Improving Transformer From a Multi-Particle Dynamic System Point of View"
Python
zhuohan123
Zhuohan Li
vLLM / Meta
bert/fairseq/modules/character_token_embedder.py
Python
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. import numpy as np import torch im...
zhuohan123/macaron-net
147
Codes for "Understanding and Improving Transformer From a Multi-Particle Dynamic System Point of View"
Python
zhuohan123
Zhuohan Li
vLLM / Meta
bert/fairseq/modules/conv_tbc.py
Python
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. import torch from torch.nn.modules...
zhuohan123/macaron-net
147
Codes for "Understanding and Improving Transformer From a Multi-Particle Dynamic System Point of View"
Python
zhuohan123
Zhuohan Li
vLLM / Meta
bert/fairseq/modules/downsampled_multihead_attention.py
Python
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. # import math import torch import...
zhuohan123/macaron-net
147
Codes for "Understanding and Improving Transformer From a Multi-Particle Dynamic System Point of View"
Python
zhuohan123
Zhuohan Li
vLLM / Meta
bert/fairseq/modules/grad_multiply.py
Python
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. import torch class GradMultiply(...
zhuohan123/macaron-net
147
Codes for "Understanding and Improving Transformer From a Multi-Particle Dynamic System Point of View"
Python
zhuohan123
Zhuohan Li
vLLM / Meta
bert/fairseq/modules/highway.py
Python
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. import torch import torch.nn.funct...
zhuohan123/macaron-net
147
Codes for "Understanding and Improving Transformer From a Multi-Particle Dynamic System Point of View"
Python
zhuohan123
Zhuohan Li
vLLM / Meta
bert/fairseq/modules/learned_positional_embedding.py
Python
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. import torch.nn as nn from fairse...
zhuohan123/macaron-net
147
Codes for "Understanding and Improving Transformer From a Multi-Particle Dynamic System Point of View"
Python
zhuohan123
Zhuohan Li
vLLM / Meta
bert/fairseq/modules/linearized_convolution.py
Python
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. import torch import torch.nn.funct...
zhuohan123/macaron-net
147
Codes for "Understanding and Improving Transformer From a Multi-Particle Dynamic System Point of View"
Python
zhuohan123
Zhuohan Li
vLLM / Meta
bert/fairseq/modules/multihead_attention.py
Python
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. import torch from torch import nn ...
zhuohan123/macaron-net
147
Codes for "Understanding and Improving Transformer From a Multi-Particle Dynamic System Point of View"
Python
zhuohan123
Zhuohan Li
vLLM / Meta
bert/fairseq/modules/scalar_bias.py
Python
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. # import torch class ScalarBias(...
zhuohan123/macaron-net
147
Codes for "Understanding and Improving Transformer From a Multi-Particle Dynamic System Point of View"
Python
zhuohan123
Zhuohan Li
vLLM / Meta
bert/fairseq/modules/sinusoidal_positional_embedding.py
Python
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. import math import torch import t...
zhuohan123/macaron-net
147
Codes for "Understanding and Improving Transformer From a Multi-Particle Dynamic System Point of View"
Python
zhuohan123
Zhuohan Li
vLLM / Meta
bert/fairseq/multiprocessing_pdb.py
Python
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. import multiprocessing import os i...
zhuohan123/macaron-net
147
Codes for "Understanding and Improving Transformer From a Multi-Particle Dynamic System Point of View"
Python
zhuohan123
Zhuohan Li
vLLM / Meta
bert/fairseq/optim/__init__.py
Python
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. import importlib import os from ....
zhuohan123/macaron-net
147
Codes for "Understanding and Improving Transformer From a Multi-Particle Dynamic System Point of View"
Python
zhuohan123
Zhuohan Li
vLLM / Meta
bert/fairseq/optim/adagrad.py
Python
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. import torch.optim from . import ...
zhuohan123/macaron-net
147
Codes for "Understanding and Improving Transformer From a Multi-Particle Dynamic System Point of View"
Python
zhuohan123
Zhuohan Li
vLLM / Meta
bert/fairseq/optim/adam.py
Python
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. import math import torch import to...
zhuohan123/macaron-net
147
Codes for "Understanding and Improving Transformer From a Multi-Particle Dynamic System Point of View"
Python
zhuohan123
Zhuohan Li
vLLM / Meta
bert/fairseq/optim/fairseq_optimizer.py
Python
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. import math import torch class ...
zhuohan123/macaron-net
147
Codes for "Understanding and Improving Transformer From a Multi-Particle Dynamic System Point of View"
Python
zhuohan123
Zhuohan Li
vLLM / Meta
bert/fairseq/optim/fp16_optimizer.py
Python
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. import torch from fairseq import ...
zhuohan123/macaron-net
147
Codes for "Understanding and Improving Transformer From a Multi-Particle Dynamic System Point of View"
Python
zhuohan123
Zhuohan Li
vLLM / Meta
bert/fairseq/optim/lr_scheduler/__init__.py
Python
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. import importlib import os from ....
zhuohan123/macaron-net
147
Codes for "Understanding and Improving Transformer From a Multi-Particle Dynamic System Point of View"
Python
zhuohan123
Zhuohan Li
vLLM / Meta
bert/fairseq/optim/lr_scheduler/cosine_lr_scheduler.py
Python
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. import math from . import Fairseq...
zhuohan123/macaron-net
147
Codes for "Understanding and Improving Transformer From a Multi-Particle Dynamic System Point of View"
Python
zhuohan123
Zhuohan Li
vLLM / Meta
bert/fairseq/optim/lr_scheduler/exp_lr_scheduler.py
Python
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. from . import FairseqLRScheduler, ...
zhuohan123/macaron-net
147
Codes for "Understanding and Improving Transformer From a Multi-Particle Dynamic System Point of View"
Python
zhuohan123
Zhuohan Li
vLLM / Meta
bert/fairseq/optim/lr_scheduler/fairseq_lr_scheduler.py
Python
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. from .. import FairseqOptimizer ...
zhuohan123/macaron-net
147
Codes for "Understanding and Improving Transformer From a Multi-Particle Dynamic System Point of View"
Python
zhuohan123
Zhuohan Li
vLLM / Meta
bert/fairseq/optim/lr_scheduler/fixed_schedule.py
Python
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. from . import FairseqLRScheduler, ...
zhuohan123/macaron-net
147
Codes for "Understanding and Improving Transformer From a Multi-Particle Dynamic System Point of View"
Python
zhuohan123
Zhuohan Li
vLLM / Meta
bert/fairseq/optim/lr_scheduler/inverse_square_root_schedule.py
Python
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. from . import FairseqLRScheduler, ...
zhuohan123/macaron-net
147
Codes for "Understanding and Improving Transformer From a Multi-Particle Dynamic System Point of View"
Python
zhuohan123
Zhuohan Li
vLLM / Meta
bert/fairseq/optim/lr_scheduler/linear_lr_schedule.py
Python
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. from . import FairseqLRScheduler, ...
zhuohan123/macaron-net
147
Codes for "Understanding and Improving Transformer From a Multi-Particle Dynamic System Point of View"
Python
zhuohan123
Zhuohan Li
vLLM / Meta
bert/fairseq/optim/lr_scheduler/reduce_lr_on_plateau.py
Python
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. import torch.optim.lr_scheduler f...
zhuohan123/macaron-net
147
Codes for "Understanding and Improving Transformer From a Multi-Particle Dynamic System Point of View"
Python
zhuohan123
Zhuohan Li
vLLM / Meta
bert/fairseq/optim/lr_scheduler/triangular_lr_scheduler.py
Python
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. import math from . import Fairseq...
zhuohan123/macaron-net
147
Codes for "Understanding and Improving Transformer From a Multi-Particle Dynamic System Point of View"
Python
zhuohan123
Zhuohan Li
vLLM / Meta
bert/fairseq/optim/nag.py
Python
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. from torch.optim.optimizer import ...
zhuohan123/macaron-net
147
Codes for "Understanding and Improving Transformer From a Multi-Particle Dynamic System Point of View"
Python
zhuohan123
Zhuohan Li
vLLM / Meta
bert/fairseq/optim/sgd.py
Python
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. import torch.optim from . import ...
zhuohan123/macaron-net
147
Codes for "Understanding and Improving Transformer From a Multi-Particle Dynamic System Point of View"
Python
zhuohan123
Zhuohan Li
vLLM / Meta
bert/fairseq/options.py
Python
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. import argparse import torch fro...
zhuohan123/macaron-net
147
Codes for "Understanding and Improving Transformer From a Multi-Particle Dynamic System Point of View"
Python
zhuohan123
Zhuohan Li
vLLM / Meta
bert/fairseq/progress_bar.py
Python
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. """ Wrapper around various loggers...
zhuohan123/macaron-net
147
Codes for "Understanding and Improving Transformer From a Multi-Particle Dynamic System Point of View"
Python
zhuohan123
Zhuohan Li
vLLM / Meta
bert/fairseq/search.py
Python
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. import torch class Search(object...
zhuohan123/macaron-net
147
Codes for "Understanding and Improving Transformer From a Multi-Particle Dynamic System Point of View"
Python
zhuohan123
Zhuohan Li
vLLM / Meta
bert/fairseq/sequence_generator.py
Python
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. import math import torch from fa...
zhuohan123/macaron-net
147
Codes for "Understanding and Improving Transformer From a Multi-Particle Dynamic System Point of View"
Python
zhuohan123
Zhuohan Li
vLLM / Meta
bert/fairseq/sequence_scorer.py
Python
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. import torch from fairseq import ...
zhuohan123/macaron-net
147
Codes for "Understanding and Improving Transformer From a Multi-Particle Dynamic System Point of View"
Python
zhuohan123
Zhuohan Li
vLLM / Meta
bert/fairseq/tasks/__init__.py
Python
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. import argparse import importlib i...
zhuohan123/macaron-net
147
Codes for "Understanding and Improving Transformer From a Multi-Particle Dynamic System Point of View"
Python
zhuohan123
Zhuohan Li
vLLM / Meta
bert/fairseq/tasks/bert.py
Python
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. import itertools import os import...
zhuohan123/macaron-net
147
Codes for "Understanding and Improving Transformer From a Multi-Particle Dynamic System Point of View"
Python
zhuohan123
Zhuohan Li
vLLM / Meta
bert/fairseq/tasks/fairseq_task.py
Python
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. from fairseq.data import data_util...
zhuohan123/macaron-net
147
Codes for "Understanding and Improving Transformer From a Multi-Particle Dynamic System Point of View"
Python
zhuohan123
Zhuohan Li
vLLM / Meta
bert/fairseq/tasks/glue.py
Python
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. import itertools import os import...
zhuohan123/macaron-net
147
Codes for "Understanding and Improving Transformer From a Multi-Particle Dynamic System Point of View"
Python
zhuohan123
Zhuohan Li
vLLM / Meta
bert/fairseq/tasks/language_modeling.py
Python
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. import itertools import numpy as n...
zhuohan123/macaron-net
147
Codes for "Understanding and Improving Transformer From a Multi-Particle Dynamic System Point of View"
Python
zhuohan123
Zhuohan Li
vLLM / Meta
bert/fairseq/tasks/translation.py
Python
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. import itertools import numpy as n...
zhuohan123/macaron-net
147
Codes for "Understanding and Improving Transformer From a Multi-Particle Dynamic System Point of View"
Python
zhuohan123
Zhuohan Li
vLLM / Meta
bert/fairseq/tokenizer.py
Python
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. from collections import Counter im...
zhuohan123/macaron-net
147
Codes for "Understanding and Improving Transformer From a Multi-Particle Dynamic System Point of View"
Python
zhuohan123
Zhuohan Li
vLLM / Meta
bert/fairseq/trainer.py
Python
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. """ Train a network across multipl...
zhuohan123/macaron-net
147
Codes for "Understanding and Improving Transformer From a Multi-Particle Dynamic System Point of View"
Python
zhuohan123
Zhuohan Li
vLLM / Meta
bert/fairseq/utils.py
Python
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. from collections import defaultdic...
zhuohan123/macaron-net
147
Codes for "Understanding and Improving Transformer From a Multi-Particle Dynamic System Point of View"
Python
zhuohan123
Zhuohan Li
vLLM / Meta
bert/generate.py
Python
#!/usr/bin/env python3 -u # Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. """ Trans...
zhuohan123/macaron-net
147
Codes for "Understanding and Improving Transformer From a Multi-Particle Dynamic System Point of View"
Python
zhuohan123
Zhuohan Li
vLLM / Meta
bert/inference.py
Python
#!/usr/bin/env python3 -u # Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the license found in the LICENSE file in # the root directory of this source tree. An additional grant of patent rights # can be found in the PATENTS file in the same directory. """ Evalu...
zhuohan123/macaron-net
147
Codes for "Understanding and Improving Transformer From a Multi-Particle Dynamic System Point of View"
Python
zhuohan123
Zhuohan Li
vLLM / Meta