Skip to content

Instantly share code, notes, and snippets.

@ebeyabraham
ebeyabraham / convert-hf-to-ggml.py
Created July 14, 2023 17:12
Convert huggingface gpt2 model to ggml
# Convert GPT-2 huggingface transformer model to ggml format
#
# Load the model using GPT2Model.
# Iterate over all variables and write them to a binary file.
#
# For each variable, write the following:
# - Number of dimensions (int)
# - Name length (int)
# - Dimensions (int[n_dims])
# - Name (char[name_length])
@ebeyabraham
ebeyabraham / config.yaml
Created April 24, 2022 12:31
conda yaml
channels:
- defaults
- conda-forge
dependencies:
- python=3.7.7
- pip=20.2.4
- pip:
- azureml-core==1.38.0
- azureml-defaults==1.38.0
- azureml-telemetry==1.38.0
@ebeyabraham
ebeyabraham / config.json
Created August 3, 2021 22:04
TF projector
{
"embeddings": [
{
"tensorName": "My tensor",
"tensorShape": [
3925,
512
],
"tensorPath": "https://gist.github.com/MrGrayCode/816e7656a8c280fac7881d85daa69f11/raw/7b3b171115ae4b1cd579e12b45c35deeba812254/vis.tsv",
"metadataPath": "https://gist.githubusercontent.com/MrGrayCode/816e7656a8c280fac7881d85daa69f11/raw/7b3b171115ae4b1cd579e12b45c35deeba812254/metadata.tsv"
@ebeyabraham
ebeyabraham / metadata.tsv
Created August 3, 2021 22:00
Tensorflow Projector
We can make this file beautiful and searchable if this error is corrected: No tabs found in this TSV file in line 0.
9
6
3
4
7
1
2
6
8
3