GGUF
Text
Text Generation
Transformers
English
mixtral
Merge
Quantization
MoE
tinyllama
conversational
Instructions to use thephimart/tinyllama-4x1.1b-moe.Q5_K_M.gguf with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use thephimart/tinyllama-4x1.1b-moe.Q5_K_M.gguf with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="thephimart/tinyllama-4x1.1b-moe.Q5_K_M.gguf", filename="tinyllama-4x1.1b-moe.Q5_K_M.gguf", )
llm.create_chat_completion( messages = "No input example has been defined for this model task." )
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use thephimart/tinyllama-4x1.1b-moe.Q5_K_M.gguf with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf thephimart/tinyllama-4x1.1b-moe.Q5_K_M.gguf:Q5_K_M # Run inference directly in the terminal: llama cli -hf thephimart/tinyllama-4x1.1b-moe.Q5_K_M.gguf:Q5_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf thephimart/tinyllama-4x1.1b-moe.Q5_K_M.gguf:Q5_K_M # Run inference directly in the terminal: llama cli -hf thephimart/tinyllama-4x1.1b-moe.Q5_K_M.gguf:Q5_K_M
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf thephimart/tinyllama-4x1.1b-moe.Q5_K_M.gguf:Q5_K_M # Run inference directly in the terminal: ./llama-cli -hf thephimart/tinyllama-4x1.1b-moe.Q5_K_M.gguf:Q5_K_M
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf thephimart/tinyllama-4x1.1b-moe.Q5_K_M.gguf:Q5_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf thephimart/tinyllama-4x1.1b-moe.Q5_K_M.gguf:Q5_K_M
Use Docker
docker model run hf.co/thephimart/tinyllama-4x1.1b-moe.Q5_K_M.gguf:Q5_K_M
- LM Studio
- Jan
- Ollama
How to use thephimart/tinyllama-4x1.1b-moe.Q5_K_M.gguf with Ollama:
ollama run hf.co/thephimart/tinyllama-4x1.1b-moe.Q5_K_M.gguf:Q5_K_M
- Unsloth Studio
How to use thephimart/tinyllama-4x1.1b-moe.Q5_K_M.gguf with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for thephimart/tinyllama-4x1.1b-moe.Q5_K_M.gguf to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for thephimart/tinyllama-4x1.1b-moe.Q5_K_M.gguf to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for thephimart/tinyllama-4x1.1b-moe.Q5_K_M.gguf to start chatting
- Atomic Chat new
- Docker Model Runner
How to use thephimart/tinyllama-4x1.1b-moe.Q5_K_M.gguf with Docker Model Runner:
docker model run hf.co/thephimart/tinyllama-4x1.1b-moe.Q5_K_M.gguf:Q5_K_M
- Lemonade
How to use thephimart/tinyllama-4x1.1b-moe.Q5_K_M.gguf with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull thephimart/tinyllama-4x1.1b-moe.Q5_K_M.gguf:Q5_K_M
Run and chat with the model
lemonade run user.tinyllama-4x1.1b-moe.Q5_K_M.gguf-Q5_K_M
List all available models
lemonade list
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,3 +1,79 @@
|
|
| 1 |
---
|
| 2 |
license: apache-2.0
|
| 3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
license: apache-2.0
|
| 3 |
---
|
| 4 |
+
|
| 5 |
+
This is a q5_K_M GGUF quantization of https://huggingface.co/s3nh/TinyLLama-4x1.1B-MoE.
|
| 6 |
+
|
| 7 |
+
Not sure how well it performs, also my first quantization, so fingers crossed.
|
| 8 |
+
|
| 9 |
+
It is a Mixture of Experts model with https://huggingface.co/TinyLlama/TinyLlama-1.1B-Chat-v1.0 as it's base model.
|
| 10 |
+
|
| 11 |
+
The other 3 models in the merge are:
|
| 12 |
+
|
| 13 |
+
https://huggingface.co/78health/TinyLlama_1.1B-function-calling
|
| 14 |
+
|
| 15 |
+
https://huggingface.co/phanerozoic/Tiny-Pirate-1.1b-v0.1
|
| 16 |
+
|
| 17 |
+
https://huggingface.co/Tensoic/TinyLlama-1.1B-3T-openhermes
|
| 18 |
+
|
| 19 |
+
I make no claims to any of the development, i simply wanted to try it out so I quantized and then thought I'd share it if anyone else was feeling experimental.
|
| 20 |
+
|
| 21 |
+
-------
|
| 22 |
+
|
| 23 |
+
Model card from https://huggingface.co/s3nh/TinyLLama-4x1.1B-MoE
|
| 24 |
+
|
| 25 |
+
Example usage:
|
| 26 |
+
|
| 27 |
+
from transformers import AutoModelForCausalLM
|
| 28 |
+
from transformers import AutoTokenizer
|
| 29 |
+
|
| 30 |
+
tokenizer = AutoTokenizer.from_pretrained("s3nh/TinyLLama-1.1B-MoE")
|
| 31 |
+
tokenizer = AutoTokenizer.from_pretrained("s3nh/TinyLLama-1.1B-MoE")
|
| 32 |
+
|
| 33 |
+
input_text = """
|
| 34 |
+
###Input: You are a pirate. tell me a story about wrecked ship.
|
| 35 |
+
###Response:
|
| 36 |
+
""")
|
| 37 |
+
|
| 38 |
+
input_ids = tokenizer.encode(input_text, return_tensors='pt').to(device)
|
| 39 |
+
output = model.generate(inputs=input_ids,
|
| 40 |
+
max_length=max_length,
|
| 41 |
+
do_sample=True,
|
| 42 |
+
top_k=10,
|
| 43 |
+
temperature=0.7,
|
| 44 |
+
pad_token_id=tokenizer.eos_token_id,
|
| 45 |
+
attention_mask=input_ids.new_ones(input_ids.shape))
|
| 46 |
+
tokenizer.decode(output[0], skip_special_tokens=True)
|
| 47 |
+
|
| 48 |
+
This model was possible to create by tremendous work of mergekit developers. I decided to merge tinyLlama models to create mixture of experts. Config used as below:
|
| 49 |
+
|
| 50 |
+
"""base_model: TinyLlama/TinyLlama-1.1B-Chat-v1.0
|
| 51 |
+
experts:
|
| 52 |
+
- source_model: TinyLlama/TinyLlama-1.1B-Chat-v1.0
|
| 53 |
+
positive_prompts:
|
| 54 |
+
- "chat"
|
| 55 |
+
- "assistant"
|
| 56 |
+
- "tell me"
|
| 57 |
+
- "explain"
|
| 58 |
+
- source_model: 78health/TinyLlama_1.1B-function-calling
|
| 59 |
+
positive_prompts:
|
| 60 |
+
- "code"
|
| 61 |
+
- "python"
|
| 62 |
+
- "javascript"
|
| 63 |
+
- "programming"
|
| 64 |
+
- "algorithm"
|
| 65 |
+
- source_model: phanerozoic/Tiny-Pirate-1.1b-v0.1
|
| 66 |
+
positive_prompts:
|
| 67 |
+
- "storywriting"
|
| 68 |
+
- "write"
|
| 69 |
+
- "scene"
|
| 70 |
+
- "story"
|
| 71 |
+
- "character"
|
| 72 |
+
- source_model: Tensoic/TinyLlama-1.1B-3T-openhermes
|
| 73 |
+
positive_prompts:
|
| 74 |
+
- "reason"
|
| 75 |
+
- "provide"
|
| 76 |
+
- "instruct"
|
| 77 |
+
- "summarize"
|
| 78 |
+
- "count"
|
| 79 |
+
"""
|