Text Generation
Transformers
PyTorch
Safetensors
English
tiny_smart_llm
gpt
language-model
conversational
custom_code
Instructions to use HenrySentinel/tinyMind with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use HenrySentinel/tinyMind with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="HenrySentinel/tinyMind", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("HenrySentinel/tinyMind", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use HenrySentinel/tinyMind with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "HenrySentinel/tinyMind" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "HenrySentinel/tinyMind", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/HenrySentinel/tinyMind
- SGLang
How to use HenrySentinel/tinyMind 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 "HenrySentinel/tinyMind" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "HenrySentinel/tinyMind", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "HenrySentinel/tinyMind" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "HenrySentinel/tinyMind", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use HenrySentinel/tinyMind with Docker Model Runner:
docker model run hf.co/HenrySentinel/tinyMind
| language: en | |
| license: apache-2.0 | |
| library_name: transformers | |
| tags: | |
| - text-generation | |
| - pytorch | |
| - gpt | |
| - language-model | |
| # tinyMind | |
| This is a small transformer language model trained from scratch with approximately 17,731,328 parameters. | |
| ## Model Details | |
| - **Architecture**: GPT-style transformer | |
| - **Parameters**: ~17M | |
| - **Layers**: 6 | |
| - **Attention Heads**: 8 | |
| - **Embedding Dimension**: 256 | |
| - **Max Sequence Length**: 512 | |
| - **Vocabulary Size**: 50257 | |
| ## Training Data | |
| The model was trained on a diverse mixture of high-quality text data including: | |
| - OpenWebText | |
| - Wikipedia articles | |
| - BookCorpus | |
| - Other curated text sources | |
| ## Usage | |
| ```python | |
| from transformers import GPT2TokenizerFast, AutoModelForCausalLM | |
| tokenizer = GPT2TokenizerFast.from_pretrained("HenrySentinel/tinyMind") | |
| model = AutoModelForCausalLM.from_pretrained("HenrySentinel/tinyMind") | |
| # Generate text | |
| input_text = "The key to artificial intelligence is" | |
| input_ids = tokenizer.encode(input_text, return_tensors="pt") | |
| output = model.generate(input_ids, max_length=100, temperature=0.8, do_sample=True) | |
| generated_text = tokenizer.decode(output[0], skip_special_tokens=True) | |
| print(generated_text) | |
| ``` | |
| ## Training Details | |
| - **Optimizer**: AdamW with cosine learning rate scheduling | |
| - **Learning Rate**: 0.001 | |
| - **Batch Size**: 8 | |
| - **Sequence Length**: 512 | |
| - **Epochs**: 3 | |
| - **Gradient Clipping**: 1.0 | |
| ## Limitations | |
| This is a small model designed for experimentation and learning. It may: | |
| - Generate inconsistent or factually incorrect content | |
| - Have limited knowledge compared to larger models | |
| - Require careful prompt engineering for best results | |
| ## License | |
| Apache 2.0 | |