Instructions to use Banaxi-Tech/BananaMind-Completor-V1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Banaxi-Tech/BananaMind-Completor-V1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Banaxi-Tech/BananaMind-Completor-V1")# Load model directly from transformers import AutoTokenizer, AutoModelForMultimodalLM tokenizer = AutoTokenizer.from_pretrained("Banaxi-Tech/BananaMind-Completor-V1") model = AutoModelForMultimodalLM.from_pretrained("Banaxi-Tech/BananaMind-Completor-V1") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Banaxi-Tech/BananaMind-Completor-V1 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Banaxi-Tech/BananaMind-Completor-V1" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Banaxi-Tech/BananaMind-Completor-V1", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Banaxi-Tech/BananaMind-Completor-V1
- SGLang
How to use Banaxi-Tech/BananaMind-Completor-V1 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 "Banaxi-Tech/BananaMind-Completor-V1" \ --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": "Banaxi-Tech/BananaMind-Completor-V1", "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 "Banaxi-Tech/BananaMind-Completor-V1" \ --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": "Banaxi-Tech/BananaMind-Completor-V1", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Banaxi-Tech/BananaMind-Completor-V1 with Docker Model Runner:
docker model run hf.co/Banaxi-Tech/BananaMind-Completor-V1
BananaMind Completor V1
BananaMind Completor V1 is a small byte-level GPT-2 causal language model for autocomplete and next-character prediction.
This is a native Hugging Face Transformers model using GPT2LMHeadModel, saved as model.safetensors. It predicts UTF-8 bytes directly with token ids 0..255, so it does not use a normal BPE tokenizer.
License
BananaMind Completor V1 model code and released weights are provided under the Apache License 2.0. See LICENSE.
The training dataset has separate upstream terms. The original ODC-BY 1.0 license text for agentlans/high-quality-english-sentences is included at THIRD_PARTY_LICENSES/ODC-BY-1.0.txt, with attribution in NOTICE.
Model Details
- Architecture:
GPT2LMHeadModel - Parameters: 1,927,936
- Vocabulary: 256 byte values
- Context length: 128 bytes
- Embedding size: 128
- Attention heads: 4
- Transformer layers: 4
- MLP inner size: 1536
- Input/output embeddings: untied
- Checkpoint source:
autocomplete_model_gpt2_best.pt - Release weights:
model.safetensors
Training Data Attribution
This model was trained on agentlans/high-quality-english-sentences, using the train split for training and the test split for validation.
Dataset attribution: agentlans/high-quality-english-sentences.
Dataset license: ODC-BY 1.0. Follow the dataset license terms when reusing the training data or distributing derived artifacts that require attribution. This release includes the original ODC-BY 1.0 license text in THIRD_PARTY_LICENSES/ODC-BY-1.0.txt.
Evaluation
The released checkpoint is the best validation checkpoint from local GPT-2 training:
| Metric | Value |
|---|---|
| Training step | 70000 |
| Training loss | 1.193311095237732 |
| Validation loss | 1.1782804751396179 |
| Best validation loss | 1.1782804751396179 |
Usage
Install dependencies:
pip install -r requirements.txt
Load the model with Transformers:
from transformers import AutoModelForCausalLM
model = AutoModelForCausalLM.from_pretrained(".")
Because this model uses raw byte ids, encode text manually:
import torch
from transformers import AutoModelForCausalLM
model = AutoModelForCausalLM.from_pretrained(".")
model.eval()
text = "The weather is beau"
tokens = list(text.encode("utf-8"))
for _ in range(20):
x = torch.tensor([tokens[-128:]], dtype=torch.long)
with torch.no_grad():
next_id = model(input_ids=x).logits[0, -1].argmax().item()
if chr(next_id) in " \n\t.,!?;:":
break
tokens.append(next_id)
print(bytes(tokens).decode("utf-8", errors="ignore"))
Or use the included helper:
python inference.py "The weather is beau"
Files
model.safetensors: native GPT-2 model weightsconfig.json: Transformers GPT-2 configgeneration_config.json: Transformers generation configinference.py: byte-level autocomplete helpertraining_metadata.json: checkpoint, dataset, and evaluation metadatarequirements.txt: minimal Python dependenciesLICENSE: Apache License 2.0 for this model releaseNOTICE: upstream dataset attribution noticeTHIRD_PARTY_LICENSES/ODC-BY-1.0.txt: original ODC-BY 1.0 license text for the training dataset
Limitations
This is a small autocomplete model trained for short English sentence contexts. It is not instruction-tuned, not a general chat model, and may produce incomplete, repetitive, or low-quality completions outside short autocomplete-style prompts.
- Downloads last month
- 195
Dataset used to train Banaxi-Tech/BananaMind-Completor-V1
Evaluation results
- Validation loss on agentlans/high-quality-english-sentencestest set self-reported1.178