Skip to content

Instantly share code, notes, and snippets.

View nimishbongale's full-sized avatar
:shipit:
Keeper of the codes.

Nimish Bongale nimishbongale

:shipit:
Keeper of the codes.
View GitHub Profile
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer, AwqConfig
model_id = "hugging-quants/Meta-Llama-3.1-8B-Instruct-AWQ-INT4"
quantization_config = AwqConfig(
bits=4,
fuse_max_seq_len=512, # Note: Update this as per your use-case
do_fuse=True,
)
messages = [
{"role": "user", "content": "Can you provide ways to eat combinations of bananas and dragonfruits?"},
{"role": "assistant", "content": "Sure! Here are some ways to eat bananas and dragonfruits together: 1. Banana and dragonfruit smoothie: Blend bananas and dragonfruits together with some milk and honey. 2. Banana and dragonfruit salad: Mix sliced bananas and dragonfruits together with some lemon juice and honey."},
{"role": "user", "content": "What about solving an 2x + 3 = 7 equation?"},
]
pipe = pipeline(
"text-generation",
model=model,
tokenizer=tokenizer,
# coding=utf-8
# Copyright 2024 Microsoft and 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/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
{
"_name_or_path": "microsoft/Phi-3-mini-128k-instruct-onnx",
"architectures": [
"Phi3ForCausalLM"
],
"attention_dropout": 0.0,
"auto_map": {
"AutoConfig": "configuration_phi3.Phi3Config",
"AutoModelForCausalLM": "modeling_phi3.Phi3ForCausalLM"
},
@nimishbongale
nimishbongale / Light_bulb_Replacement_Documentation_Nimish_Draft_1.md
Created January 30, 2022 14:49
A gist describing how to replace a light bulb

Step By Step Guide to Replacing a Light bulb 💡

If you’ve been looking for a no-nonsense guide to replacing a light bulb, you’ve just struck gold! These guidelines are for you if you need to change your light bulb out.

Preface

We’ve established, for starters, that there seems to be something off with the light bulb. Flicking the switch on/off does not yield expected results.

To rectify the above problem, we may need:

//Solving Cache Coherence with Padding
struct padded_int
{
int val;
char padding[60];
} private_count[MAX_THREADS];
//Peril-R
forall(index in (1..12))
exclusive {}
# Age/Gender/Area
# Financial/Health/Agricultural/Defence
import os
from flask import Flask,request
from twilio.twiml.voice_response import VoiceResponse,Gather
from twilio.rest import Client
import requests
app = Flask(__name__)
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'chart.ui'
#
# Created by: PyQt5 UI code generator 5.13.0
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
@nimishbongale
nimishbongale / README.md
Created November 29, 2019 13:26
README.md format for SL LAB submissions

Scripting Lab Programs Submission

(under Department of ISE, Ramaiah Institute of Technology)

USN : 1MS17IS000

Name : ABC DEF

Section : 5A

Submitted to Dr. Mydhili K Nair (Faculty Coordinator)