Instructions to use nilq/lua-stories-linear-mistral-1L-tiny with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use nilq/lua-stories-linear-mistral-1L-tiny with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="nilq/lua-stories-linear-mistral-1L-tiny")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("nilq/lua-stories-linear-mistral-1L-tiny") model = AutoModelForCausalLM.from_pretrained("nilq/lua-stories-linear-mistral-1L-tiny") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use nilq/lua-stories-linear-mistral-1L-tiny with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "nilq/lua-stories-linear-mistral-1L-tiny" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "nilq/lua-stories-linear-mistral-1L-tiny", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/nilq/lua-stories-linear-mistral-1L-tiny
- SGLang
How to use nilq/lua-stories-linear-mistral-1L-tiny 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 "nilq/lua-stories-linear-mistral-1L-tiny" \ --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": "nilq/lua-stories-linear-mistral-1L-tiny", "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 "nilq/lua-stories-linear-mistral-1L-tiny" \ --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": "nilq/lua-stories-linear-mistral-1L-tiny", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use nilq/lua-stories-linear-mistral-1L-tiny with Docker Model Runner:
docker model run hf.co/nilq/lua-stories-linear-mistral-1L-tiny
Upload folder using huggingface_hub
Browse files- README.md +4 -4
- config.json +2 -2
- mergekit_config.yml +2 -2
- model-00001-of-00001.safetensors +1 -1
README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
---
|
| 2 |
base_model:
|
| 3 |
-
- nilq/lua-mistral-1L-tiny
|
| 4 |
- nilq/mistral-1L-tiny
|
|
|
|
| 5 |
library_name: transformers
|
| 6 |
tags:
|
| 7 |
- mergekit
|
|
@@ -20,8 +20,8 @@ This model was merged using the [linear](https://arxiv.org/abs/2203.05482) merge
|
|
| 20 |
### Models Merged
|
| 21 |
|
| 22 |
The following models were included in the merge:
|
| 23 |
-
* [nilq/lua-mistral-1L-tiny](https://huggingface.co/nilq/lua-mistral-1L-tiny)
|
| 24 |
* [nilq/mistral-1L-tiny](https://huggingface.co/nilq/mistral-1L-tiny)
|
|
|
|
| 25 |
|
| 26 |
### Configuration
|
| 27 |
|
|
@@ -31,10 +31,10 @@ The following YAML configuration was used to produce this model:
|
|
| 31 |
models:
|
| 32 |
- model: nilq/mistral-1L-tiny
|
| 33 |
parameters:
|
| 34 |
-
weight:
|
| 35 |
- model: nilq/lua-mistral-1L-tiny
|
| 36 |
parameters:
|
| 37 |
-
weight: 0.
|
| 38 |
merge_method: linear
|
| 39 |
dtype: float32
|
| 40 |
```
|
|
|
|
| 1 |
---
|
| 2 |
base_model:
|
|
|
|
| 3 |
- nilq/mistral-1L-tiny
|
| 4 |
+
- nilq/lua-mistral-1L-tiny
|
| 5 |
library_name: transformers
|
| 6 |
tags:
|
| 7 |
- mergekit
|
|
|
|
| 20 |
### Models Merged
|
| 21 |
|
| 22 |
The following models were included in the merge:
|
|
|
|
| 23 |
* [nilq/mistral-1L-tiny](https://huggingface.co/nilq/mistral-1L-tiny)
|
| 24 |
+
* [nilq/lua-mistral-1L-tiny](https://huggingface.co/nilq/lua-mistral-1L-tiny)
|
| 25 |
|
| 26 |
### Configuration
|
| 27 |
|
|
|
|
| 31 |
models:
|
| 32 |
- model: nilq/mistral-1L-tiny
|
| 33 |
parameters:
|
| 34 |
+
weight: 0.5
|
| 35 |
- model: nilq/lua-mistral-1L-tiny
|
| 36 |
parameters:
|
| 37 |
+
weight: 0.5
|
| 38 |
merge_method: linear
|
| 39 |
dtype: float32
|
| 40 |
```
|
config.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
| 1 |
{
|
| 2 |
-
"_name_or_path": "nilq/
|
| 3 |
"architectures": [
|
| 4 |
"MistralForCausalLM"
|
| 5 |
],
|
| 6 |
-
"attention_dropout": 0
|
| 7 |
"bos_token_id": 1,
|
| 8 |
"eos_token_id": 2,
|
| 9 |
"hidden_act": "silu",
|
|
|
|
| 1 |
{
|
| 2 |
+
"_name_or_path": "nilq/mistral-1L-tiny",
|
| 3 |
"architectures": [
|
| 4 |
"MistralForCausalLM"
|
| 5 |
],
|
| 6 |
+
"attention_dropout": 0,
|
| 7 |
"bos_token_id": 1,
|
| 8 |
"eos_token_id": 2,
|
| 9 |
"hidden_act": "silu",
|
mergekit_config.yml
CHANGED
|
@@ -1,9 +1,9 @@
|
|
| 1 |
models:
|
| 2 |
- model: nilq/mistral-1L-tiny
|
| 3 |
parameters:
|
| 4 |
-
weight:
|
| 5 |
- model: nilq/lua-mistral-1L-tiny
|
| 6 |
parameters:
|
| 7 |
-
weight: 0.
|
| 8 |
merge_method: linear
|
| 9 |
dtype: float32
|
|
|
|
| 1 |
models:
|
| 2 |
- model: nilq/mistral-1L-tiny
|
| 3 |
parameters:
|
| 4 |
+
weight: 0.5
|
| 5 |
- model: nilq/lua-mistral-1L-tiny
|
| 6 |
parameters:
|
| 7 |
+
weight: 0.5
|
| 8 |
merge_method: linear
|
| 9 |
dtype: float32
|
model-00001-of-00001.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 140516640
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d0abb159360fe6d75c1d481b3c04ba5363841e0a96d6d274f55d92ef88a511e7
|
| 3 |
size 140516640
|