Skip to content

Instantly share code, notes, and snippets.

View donwany's full-sized avatar

Theophilus Siameh donwany

View GitHub Profile
@donwany
donwany / gemma.py
Created February 23, 2024 06:51 — forked from philschmid/gemma.py
from openai import OpenAI
# initialize the client but point it to TGI
client = OpenAI(
base_url="https://api-inference.huggingface.co/v1",
api_key="hf_xxx" # Replace with your token
)
chat_completion = client.chat.completions.create(
model="google/gemma-7b-it",
@donwany
donwany / runpod.py
Created February 9, 2024 04:19 — forked from AIAnytime/runpod.py
RunPod Code
import os
#set you runpod key as a environment variable
os.environ['RUNPOD_API_KEY'] = "your_runpod_api_key"
import runpod
from IPython.display import display, Markdown
runpod.api_key = os.getenv("RUNPOD_API_KEY", "your_runpod_api_key")
if runpod.api_key == "your_runpod_api_key":
@donwany
donwany / finetune_llama_v2.py
Created August 8, 2023 02:21 — forked from younesbelkada/finetune_llama_v2.py
Fine tune Llama v2 models on Guanaco Dataset
# coding=utf-8
# Copyright 2023 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
# Source: https://gist.github.com/8d941690a087b0de0e2731a52cfb1f51
###############################################################
# Building Event-Driven Microservices In Kubernetes With Dapr #
# https://youtu.be/-4sHUvfk2Eg #
###############################################################
# Additional Info:
# - https://dapr.io
# - What is microservices architecture?: https://youtu.be/F-37_gV2tMs
@donwany
donwany / xgboost-2.ipynb
Created April 2, 2018 18:16
Cloud Prediction using Xgboost with AWS SageMaker
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@donwany
donwany / xgboost.ipynb
Created April 2, 2018 18:06
XGBoost Algorithm with AWS SageMaker
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@donwany
donwany / sagemaker.ipynb
Created April 1, 2018 14:27
Introduction to amazon sagemaker 101
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@donwany
donwany / s3.ipynb
Last active April 1, 2018 03:04
These snippets of code will guide you to uploading/downloading files to amazon s3 buckets with the require permissions to read and write objects.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.