Team Ai
Datasetpublic

Brunobkr/llama.cpp_AlgMor24_github

ΩFFFΣLLIa • llama.cpp • AlgMor24 ██████╗ ███████╗███████╗███████╗██╗ ██╗ ██╗ █████╗ ██╔═══██╗██╔════╝██╔════╝██╔════╝██║ ██║ ██║██╔══██╗ ██║ ██║█████╗ █████╗ █████╗ ██║ ██║ ██║███████║ ██║ ██║██╔══╝ ██╔══╝ ██╔══╝ ██║ ██║ ██║██╔══██║ ╚██████╔╝██║ ██║ ███████╗███████╗███████╗██║██║ ██║ ╚═════╝ ╚═╝ ╚═╝ ╚══════╝╚══════╝╚══════╝╚═╝╚═╝ ╚═╝ High-Performance LLM / VLM Inference & Autonomous Agentic Ecosystem… See the full description on the dataset page: https://huggingface.co/datasets/Brunobkr/llama.cpp_AlgMor24_github.

sourceHugging Faceupdated 2mo agoView on Hugging Face
0likes3.1kdownloads
base64-string.js286 linesDownload Raw Back to libs
1// Copyright (c) 2013 Pieroxy <pieroxy@pieroxy.net>2// This work is free. You can redistribute it and/or modify it3// under the terms of the WTFPL, Version 24// For more information see LICENSE.txt or http://www.wtfpl.net/5//6// This lib is part of the lz-string project.7// For more information, the home page:8// http://pieroxy.net/blog/pages/lz-string/index.html9//10// Base64 compression / decompression for already compressed content (gif, png, jpg, mp3, ...) 11// version 1.4.112var Base64String = {13  14  compressToUTF16 : function (input) {15    var output = [],16        i,c,17        current,18        status = 0;19    20    input = this.compress(input);21    22    for (i=0 ; i<input.length ; i++) {23      c = input.charCodeAt(i);24      switch (status++) {25        case 0:26          output.push(String.fromCharCode((c >> 1)+32));27          current = (c & 1) << 14;28          break;29        case 1:30          output.push(String.fromCharCode((current + (c >> 2))+32));31          current = (c & 3) << 13;32          break;33        case 2:34          output.push(String.fromCharCode((current + (c >> 3))+32));35          current = (c & 7) << 12;36          break;37        case 3:38          output.push(String.fromCharCode((current + (c >> 4))+32));39          current = (c & 15) << 11;40          break;41        case 4:42          output.push(String.fromCharCode((current + (c >> 5))+32));43          current = (c & 31) << 10;44          break;45        case 5:46          output.push(String.fromCharCode((current + (c >> 6))+32));47          current = (c & 63) << 9;48          break;49        case 6:50          output.push(String.fromCharCode((current + (c >> 7))+32));51          current = (c & 127) << 8;52          break;53        case 7:54          output.push(String.fromCharCode((current + (c >> 8))+32));55          current = (c & 255) << 7;56          break;57        case 8:58          output.push(String.fromCharCode((current + (c >> 9))+32));59          current = (c & 511) << 6;60          break;61        case 9:62          output.push(String.fromCharCode((current + (c >> 10))+32));63          current = (c & 1023) << 5;64          break;65        case 10:66          output.push(String.fromCharCode((current + (c >> 11))+32));67          current = (c & 2047) << 4;68          break;69        case 11:70          output.push(String.fromCharCode((current + (c >> 12))+32));71          current = (c & 4095) << 3;72          break;73        case 12:74          output.push(String.fromCharCode((current + (c >> 13))+32));75          current = (c & 8191) << 2;76          break;77        case 13:78          output.push(String.fromCharCode((current + (c >> 14))+32));79          current = (c & 16383) << 1;80          break;81        case 14:82          output.push(String.fromCharCode((current + (c >> 15))+32, (c & 32767)+32));83          status = 0;84          break;85      }86    }87    output.push(String.fromCharCode(current + 32));88    return output.join('');89  },90  91 92  decompressFromUTF16 : function (input) {93    var output = [],94        current,c,95        status=0,96        i = 0;97    98    while (i < input.length) {99      c = input.charCodeAt(i) - 32;100      101      switch (status++) {102        case 0:103          current = c << 1;104          break;105        case 1:106          output.push(String.fromCharCode(current | (c >> 14)));107          current = (c&16383) << 2;108          break;109        case 2:110          output.push(String.fromCharCode(current | (c >> 13)));111          current = (c&8191) << 3;112          break;113        case 3:114          output.push(String.fromCharCode(current | (c >> 12)));115          current = (c&4095) << 4;116          break;117        case 4:118          output.push(String.fromCharCode(current | (c >> 11)));119          current = (c&2047) << 5;120          break;121        case 5:122          output.push(String.fromCharCode(current | (c >> 10)));123          current = (c&1023) << 6;124          break;125        case 6:126          output.push(String.fromCharCode(current | (c >> 9)));127          current = (c&511) << 7;128          break;129        case 7:130          output.push(String.fromCharCode(current | (c >> 8)));131          current = (c&255) << 8;132          break;133        case 8:134          output.push(String.fromCharCode(current | (c >> 7)));135          current = (c&127) << 9;136          break;137        case 9:138          output.push(String.fromCharCode(current | (c >> 6)));139          current = (c&63) << 10;140          break;141        case 10:142          output.push(String.fromCharCode(current | (c >> 5)));143          current = (c&31) << 11;144          break;145        case 11:146          output.push(String.fromCharCode(current | (c >> 4)));147          current = (c&15) << 12;148          break;149        case 12:150          output.push(String.fromCharCode(current | (c >> 3)));151          current = (c&7) << 13;152          break;153        case 13:154          output.push(String.fromCharCode(current | (c >> 2)));155          current = (c&3) << 14;156          break;157        case 14:158          output.push(String.fromCharCode(current | (c >> 1)));159          current = (c&1) << 15;160          break;161        case 15:162          output.push(String.fromCharCode(current | c));163          status=0;164          break;165      }166      167      168      i++;169    }170    171    return this.decompress(output.join(''));172    //return output;173    174  },175 176 177  // private property178  _keyStr : "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",179  180  decompress : function (input) {181    var output = [];182    var chr1, chr2, chr3, enc1, enc2, enc3, enc4;183    var i = 1;184    var odd = input.charCodeAt(0) >> 8;185    186    while (i < input.length*2 && (i < input.length*2-1 || odd==0)) {187      188      if (i%2==0) {189        chr1 = input.charCodeAt(i/2) >> 8;190        chr2 = input.charCodeAt(i/2) & 255;191        if (i/2+1 < input.length) 192          chr3 = input.charCodeAt(i/2+1) >> 8;193        else 194          chr3 = NaN;195      } else {196        chr1 = input.charCodeAt((i-1)/2) & 255;197        if ((i+1)/2 < input.length) {198          chr2 = input.charCodeAt((i+1)/2) >> 8;199          chr3 = input.charCodeAt((i+1)/2) & 255;200        } else 201          chr2=chr3=NaN;202      }203      i+=3;204      205      enc1 = chr1 >> 2;206      enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);207      enc3 = ((chr2 & 15) << 2) | (chr3 >> 6);208      enc4 = chr3 & 63;209      210      if (isNaN(chr2) || (i==input.length*2+1 && odd)) {211        enc3 = enc4 = 64;212      } else if (isNaN(chr3) || (i==input.length*2 && odd)) {213        enc4 = 64;214      }215      216      output.push(this._keyStr.charAt(enc1));217      output.push(this._keyStr.charAt(enc2));218      output.push(this._keyStr.charAt(enc3));219      output.push(this._keyStr.charAt(enc4));220    }221    222    return output.join('');223  },224  225  compress : function (input) {226    var output = [],227        ol = 1, 228        output_,229        chr1, chr2, chr3,230        enc1, enc2, enc3, enc4,231        i = 0, flush=false;232    233    input = input.replace(/[^A-Za-z0-9\+\/\=]/g, "");234    235    while (i < input.length) {236      237      enc1 = this._keyStr.indexOf(input.charAt(i++));238      enc2 = this._keyStr.indexOf(input.charAt(i++));239      enc3 = this._keyStr.indexOf(input.charAt(i++));240      enc4 = this._keyStr.indexOf(input.charAt(i++));241      242      chr1 = (enc1 << 2) | (enc2 >> 4);243      chr2 = ((enc2 & 15) << 4) | (enc3 >> 2);244      chr3 = ((enc3 & 3) << 6) | enc4;245      246      if (ol%2==0) {247        output_ = chr1 << 8;248        flush = true;249        250        if (enc3 != 64) {251          output.push(String.fromCharCode(output_ | chr2));252          flush = false;253        }254        if (enc4 != 64) {255          output_ = chr3 << 8;256          flush = true;257        }258      } else {259        output.push(String.fromCharCode(output_ | chr1));260        flush = false;261        262        if (enc3 != 64) {263          output_ = chr2 << 8;264          flush = true;265        }266        if (enc4 != 64) {267          output.push(String.fromCharCode(output_ | chr3));268          flush = false;269        }270      }271      ol+=3;272    }273    274    if (flush) {275      output.push(String.fromCharCode(output_));276      output = output.join('');277      output = String.fromCharCode(output.charCodeAt(0)|256) + output.substring(1);278    } else {279      output = output.join('');280    }281    282    return output;283    284  }285}286 
Brunobkr/llama.cpp_AlgMor24_github · Team Ai