Instructions to use Corianas/64CharGPT with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Corianas/64CharGPT with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Corianas/64CharGPT")# Load model directly from transformers import AutoTokenizer, GPT2 tokenizer = AutoTokenizer.from_pretrained("Corianas/64CharGPT") model = GPT2.from_pretrained("Corianas/64CharGPT") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Corianas/64CharGPT with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Corianas/64CharGPT" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Corianas/64CharGPT", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Corianas/64CharGPT
- SGLang
How to use Corianas/64CharGPT with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "Corianas/64CharGPT" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Corianas/64CharGPT", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "Corianas/64CharGPT" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Corianas/64CharGPT", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Corianas/64CharGPT with Docker Model Runner:
docker model run hf.co/Corianas/64CharGPT
Vocab is:
\n\" !$&'#,/+=-<>*@.:;[]^?0123456789abcdefghijklmnopqrstuvwxyzèé§↨
§ (made from alt+21) was used as end of file/sample
↨ (made from alt+23) is the shift key (and gets removed and the next character gets replaced with an uppdercase character)
Model is trained on scraped youtube subtitles and whispered transcripts of youtube/tv shows. totalling approx 2.3billion tokens when processed.
Data was Deduped, Had all UPPERCASE samples removed, and ran a 'ranker' that removed random data which somehow was included in the subtitles on youtube. (such as total gibberish)
Training took 72 hours, and was stopped when overfitting occured. (this is checkpoint 264000 out of a planned 400000)
gradient_accumulation_steps = 2 # used to simulate larger batch sizes
batch_size = 45 # if gradient_accumulation_steps > 1, this is the micro-batch size
block_size = 768
n_layer = 12
n_head = 8
n_embd = 512
dropout = 0.00001 # for pretraining 0 is good, for finetuning try 0.1+
bias = False # do we use bias inside LayerNorm and Linear layers?
learning_rate = 0.0008 # max learning rate
min_lr = 0.00008
function to fix text from the model:
def remove_caseifer(text):
new_text = ""
i = 0
while i < len(text):
if text[i] == "↨":
if i+1 < len(text):
new_text += text[i+1].upper()
i += 1
else:
pass # skip this index
else:
new_text += text[i]
i += 1
return new_text
function to prepare text for the model:
def add_caseifer(text):
uppers = 0
lowers = 0
tokenlist = set("\n\" !$&'#,/+=-<>*@.:;[]{}()^?0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzèé")
replace_map = { # Define a mapping of characters to be replaced
"{": "[",
"(": "[",
"}": "]",
")": "]"
}
upperlist = set("ABCDEFGHIJKLMNOPQRSTUVWXYZ")
lowerlist = set("abcdefghijklmnopqrstuvwxyz")
new_text = ""
for char in text:
if char in tokenlist:
if char in upperlist:
new_text += "↨" + char.lower()
elif char in replace_map:
new_text += replace_map[char]
else:
new_text += char
else:
continue
return new_text
- Downloads last month
- 4