Instructions to use Blackroot/TensorProduct-Microllama with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Blackroot/TensorProduct-Microllama with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Blackroot/TensorProduct-Microllama")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("Blackroot/TensorProduct-Microllama", dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use Blackroot/TensorProduct-Microllama with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Blackroot/TensorProduct-Microllama" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Blackroot/TensorProduct-Microllama", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Blackroot/TensorProduct-Microllama
- SGLang
How to use Blackroot/TensorProduct-Microllama 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 "Blackroot/TensorProduct-Microllama" \ --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": "Blackroot/TensorProduct-Microllama", "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 "Blackroot/TensorProduct-Microllama" \ --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": "Blackroot/TensorProduct-Microllama", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Blackroot/TensorProduct-Microllama with Docker Model Runner:
docker model run hf.co/Blackroot/TensorProduct-Microllama
Add model card metadata: pipeline tag, library name, link to paper, and link to code repository.
#1
by nielsr HF Staff - opened
README.md
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
From scratch pretraining on english only no synthetic data, no code, 3 epochs of 1 gig of data for the ~125M param model.
|
| 2 |
|
| 3 |
Test network using [Tensor Product Attention](https://arxiv.org/abs/2501.06425). Other than some alterations to the attention, such as 16 heads insted of 9 and using TPA, this is the same setup as https://huggingface.co/HuggingFaceTB/SmolLM2-135M-Instruct
|
|
@@ -21,3 +27,7 @@ One of the primary reported benefits for TPA are for inference which are not rea
|
|
| 21 |
- Final Train Perplexity: 20.95
|
| 22 |
|
| 23 |

|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
library_name: transformers
|
| 4 |
+
pipeline_tag: text-generation
|
| 5 |
+
---
|
| 6 |
+
|
| 7 |
From scratch pretraining on english only no synthetic data, no code, 3 epochs of 1 gig of data for the ~125M param model.
|
| 8 |
|
| 9 |
Test network using [Tensor Product Attention](https://arxiv.org/abs/2501.06425). Other than some alterations to the attention, such as 16 heads insted of 9 and using TPA, this is the same setup as https://huggingface.co/HuggingFaceTB/SmolLM2-135M-Instruct
|
|
|
|
| 27 |
- Final Train Perplexity: 20.95
|
| 28 |
|
| 29 |

|
| 30 |
+
|
| 31 |
+
# Code
|
| 32 |
+
|
| 33 |
+
The code is available at: https://github.com/tensorgi/T6.
|