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 logging | |
import mlflow | |
from os import getenv | |
from opencensus.ext.azure.common import utils | |
from opencensus.ext.azure.log_exporter import AzureLogHandler | |
class SingletonLoggerFactory(type): | |
_instances = {} |
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 torch import cuda, bfloat16 | |
from langchain.llms import HuggingFacePipeline | |
import transformers | |
model_id = 'meta-llama/Llama-2-13b-chat-hf' | |
device = f'cuda:{cuda.current_device()}' if cuda.is_available() else 'cpu' | |
# set quantization configuration to load large model with less GPU memory | |
# this requires the `bitsandbytes` library |
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
Once upon a time, there was a man named John who lived in a small town. John was a quiet and reserved man who kept to himself most of the time. He had a reputation for being a bit odd, but people generally left him alone. | |
One day, strange things began happening around town. People reported seeing shadowy figures lurking in the corners of their vision, and whispers could be heard when no one was around. Some even claimed to have seen the ghostly figure of a man wandering the streets at night. | |
As the rumors grew, people began to suspect that John was behind it all. They remembered his strange behavior and how he always seemed to be watching them. They started to avoid him, afraid of what he might do. | |
One night, a group of teenagers decided to investigate John's house. They crept through the darkened streets, hearts racing with fear. When they arrived at John's house, they found the door unlocked and pushed it open slowly. | |
Inside, they found a dark and dusty room filled with strange artifacts. There were old |