Skip to content

Instantly share code, notes, and snippets.

View shivam-51's full-sized avatar
💥
Thinking ..Doing

Shivam Kumar Singh shivam-51

💥
Thinking ..Doing
View GitHub Profile
@shivam-51
shivam-51 / testing-gpt.txt
Created February 1, 2024 14:21
testing-gpt.txt
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
@shivam-51
shivam-51 / llama.py
Last active October 4, 2023 09:44
Using llama 13b model from huggingface
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
@shivam-51
shivam-51 / AppLogger.py
Last active December 1, 2022 05:34
AppLogger class for databricks
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 = {}