Instructions to use srinivasbilla/tinymix-8x1b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use srinivasbilla/tinymix-8x1b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="srinivasbilla/tinymix-8x1b")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("srinivasbilla/tinymix-8x1b") model = AutoModelForCausalLM.from_pretrained("srinivasbilla/tinymix-8x1b") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use srinivasbilla/tinymix-8x1b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "srinivasbilla/tinymix-8x1b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "srinivasbilla/tinymix-8x1b", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/srinivasbilla/tinymix-8x1b
- SGLang
How to use srinivasbilla/tinymix-8x1b 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 "srinivasbilla/tinymix-8x1b" \ --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": "srinivasbilla/tinymix-8x1b", "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 "srinivasbilla/tinymix-8x1b" \ --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": "srinivasbilla/tinymix-8x1b", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use srinivasbilla/tinymix-8x1b with Docker Model Runner:
docker model run hf.co/srinivasbilla/tinymix-8x1b
This is a MoE-ification of TinyLlama/TinyLlama-1.1B-intermediate-step-1431k-3T using the Mixtral branch of mergekit
The Goal was to MoE-fy the TinyLlama model and then use this as a base model to further train from. The intuition being finetuning 8x1b should give better performance than finetuning 1b by itself.
More work coming!
Inference Template
This is a merge of the base model, so treat it like a completion.
llm.generate('Quantum Tunneling is')
Mergekit Config
base_model: TinyLlama/TinyLlama-1.1B-Chat-v1.0
gate_mode: hidden
dtype: bfloat16
experts:
- source_model: /TinyLlama/TinyLlama-1.1B-intermediate-step-1431k-3T
positive_prompts: [""]
- source_model: /TinyLlama/TinyLlama-1.1B-intermediate-step-1431k-3T
positive_prompts: [""]
- source_model: /TinyLlama/TinyLlama-1.1B-intermediate-step-1431k-3T
positive_prompts: [""]
- source_model: /TinyLlama/TinyLlama-1.1B-intermediate-step-1431k-3T
positive_prompts: [""]
- source_model: /TinyLlama/TinyLlama-1.1B-intermediate-step-1431k-3T
positive_prompts: [""]
- source_model: /TinyLlama/TinyLlama-1.1B-intermediate-step-1431k-3T
positive_prompts: [""]
- source_model: /TinyLlama/TinyLlama-1.1B-intermediate-step-1431k-3T
positive_prompts: [""]
- source_model: /TinyLlama/TinyLlama-1.1B-intermediate-step-1431k-3T
positive_prompts: [""]
Eval
Thanks to u/mhenrichsen for thr HellaSwag score
| Tasks |Version|Filter|n-shot| Metric |Value | |Stderr|
|---------|-------|------|-----:|--------|-----:|---|-----:|
|hellaswag|Yaml |none | 0|acc |0.4659|± |0.0050|
| | |none | 0|acc\_norm|0.6044|± |0.0049|
- Downloads last month
- 7