Instructions to use Abiray/MicroLlama-134M-Instruct with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use Abiray/MicroLlama-134M-Instruct with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="Abiray/MicroLlama-134M-Instruct", filename="MiniLlama-134M-Instruct-v2-F16.gguf", )
llm.create_chat_completion( messages = "No input example has been defined for this model task." )
- Notebooks
- Google Colab
- Kaggle
- Local Apps
- llama.cpp
How to use Abiray/MicroLlama-134M-Instruct with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf Abiray/MicroLlama-134M-Instruct:F16 # Run inference directly in the terminal: llama-cli -hf Abiray/MicroLlama-134M-Instruct:F16
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf Abiray/MicroLlama-134M-Instruct:F16 # Run inference directly in the terminal: llama-cli -hf Abiray/MicroLlama-134M-Instruct:F16
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 Abiray/MicroLlama-134M-Instruct:F16 # Run inference directly in the terminal: ./llama-cli -hf Abiray/MicroLlama-134M-Instruct:F16
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 Abiray/MicroLlama-134M-Instruct:F16 # Run inference directly in the terminal: ./build/bin/llama-cli -hf Abiray/MicroLlama-134M-Instruct:F16
Use Docker
docker model run hf.co/Abiray/MicroLlama-134M-Instruct:F16
- LM Studio
- Jan
- Ollama
How to use Abiray/MicroLlama-134M-Instruct with Ollama:
ollama run hf.co/Abiray/MicroLlama-134M-Instruct:F16
- Unsloth Studio
How to use Abiray/MicroLlama-134M-Instruct 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 Abiray/MicroLlama-134M-Instruct 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 Abiray/MicroLlama-134M-Instruct to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for Abiray/MicroLlama-134M-Instruct to start chatting
- Docker Model Runner
How to use Abiray/MicroLlama-134M-Instruct with Docker Model Runner:
docker model run hf.co/Abiray/MicroLlama-134M-Instruct:F16
- Lemonade
How to use Abiray/MicroLlama-134M-Instruct with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull Abiray/MicroLlama-134M-Instruct:F16
Run and chat with the model
lemonade run user.MicroLlama-134M-Instruct-F16
List all available models
lemonade list
ray commited on
Commit ·
0d4ffa9
1
Parent(s): 65e9ae7
Upload folder using huggingface_hub
Browse files- chat_template.jinja +15 -0
- config.json +27 -0
- model.safetensors +3 -0
- tokenizer.json +0 -0
- tokenizer_config.json +15 -0
chat_template.jinja
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{% for message in messages %}
|
| 2 |
+
{% if message['role'] == 'user' %}
|
| 3 |
+
{{ '<|user|>
|
| 4 |
+
' + message['content'] + eos_token }}
|
| 5 |
+
{% elif message['role'] == 'system' %}
|
| 6 |
+
{{ '<|system|>
|
| 7 |
+
' + message['content'] + eos_token }}
|
| 8 |
+
{% elif message['role'] == 'assistant' %}
|
| 9 |
+
{{ '<|assistant|>
|
| 10 |
+
' + message['content'] + eos_token }}
|
| 11 |
+
{% endif %}
|
| 12 |
+
{% if loop.last and add_generation_prompt %}
|
| 13 |
+
{{ '<|assistant|>' }}
|
| 14 |
+
{% endif %}
|
| 15 |
+
{% endfor %}
|
config.json
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"LlamaForCausalLM"
|
| 4 |
+
],
|
| 5 |
+
"attention_bias": false,
|
| 6 |
+
"attention_dropout": 0.0,
|
| 7 |
+
"bos_token_id": 1,
|
| 8 |
+
"eos_token_id": 2,
|
| 9 |
+
"hidden_act": "silu",
|
| 10 |
+
"hidden_size": 768,
|
| 11 |
+
"initializer_range": 0.02,
|
| 12 |
+
"intermediate_size": 2048,
|
| 13 |
+
"max_position_embeddings": 1024,
|
| 14 |
+
"model_type": "llama",
|
| 15 |
+
"num_attention_heads": 12,
|
| 16 |
+
"num_hidden_layers": 12,
|
| 17 |
+
"num_key_value_heads": 12,
|
| 18 |
+
"pretraining_tp": 1,
|
| 19 |
+
"rms_norm_eps": 1e-06,
|
| 20 |
+
"rope_scaling": null,
|
| 21 |
+
"rope_theta": 10000.0,
|
| 22 |
+
"tie_word_embeddings": false,
|
| 23 |
+
"torch_dtype": "bfloat16",
|
| 24 |
+
"transformers_version": "4.38.0",
|
| 25 |
+
"use_cache": true,
|
| 26 |
+
"vocab_size": 32000
|
| 27 |
+
}
|
model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:039502f799c7eb5fb2ac0bd45e0167ca382b82827dde561178b2372ae2699d4b
|
| 3 |
+
size 268223016
|
tokenizer.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
tokenizer_config.json
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"backend": "tokenizers",
|
| 3 |
+
"bos_token": "<s>",
|
| 4 |
+
"clean_up_tokenization_spaces": false,
|
| 5 |
+
"eos_token": "</s>",
|
| 6 |
+
"is_local": false,
|
| 7 |
+
"legacy": false,
|
| 8 |
+
"model_max_length": 2048,
|
| 9 |
+
"pad_token": "</s>",
|
| 10 |
+
"padding_side": "right",
|
| 11 |
+
"sp_model_kwargs": {},
|
| 12 |
+
"tokenizer_class": "TokenizersBackend",
|
| 13 |
+
"unk_token": "<unk>",
|
| 14 |
+
"use_default_system_prompt": false
|
| 15 |
+
}
|