Text Generation
Transformers
Safetensors
GGUF
Lithuanian
llama
lithuanian
from-scratch
reasoning
text-generation-inference
conversational
Instructions to use Linksas/L1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Linksas/L1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Linksas/L1")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Linksas/L1") model = AutoModelForCausalLM.from_pretrained("Linksas/L1", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use Linksas/L1 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 Linksas/L1:Q8_0 # Run inference directly in the terminal: llama cli -hf Linksas/L1:Q8_0
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf Linksas/L1:Q8_0 # Run inference directly in the terminal: llama cli -hf Linksas/L1:Q8_0
Build from source code
git clone https://github.com/ggml-org/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-app # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama serve -hf Linksas/L1:Q8_0 # Run inference directly in the terminal: ./build/bin/llama cli -hf Linksas/L1:Q8_0
Use Docker
docker model run hf.co/Linksas/L1:Q8_0
- Llama new
- LM Studio
- Jan
- vLLM
How to use Linksas/L1 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Linksas/L1" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Linksas/L1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Linksas/L1:Q8_0
- SGLang
How to use Linksas/L1 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 "Linksas/L1" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Linksas/L1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'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 "Linksas/L1" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Linksas/L1", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use Linksas/L1 with Ollama:
ollama run hf.co/Linksas/L1:Q8_0
- Unsloth Desktop
- Docker Model Runner
How to use Linksas/L1 with Docker Model Runner:
docker model run hf.co/Linksas/L1:Q8_0
- Lemonade
How to use Linksas/L1 with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull Linksas/L1:Q8_0
Run and chat with the model
lemonade run user.L1-Q8_0
List all available models
lemonade list
- Atomic Chat
Upload folder using huggingface_hub
Browse files- README.md +23 -3
- config.json +32 -0
- generation_config.json +10 -0
- model.safetensors +3 -0
- tokenizer.json +0 -0
- tokenizer_config.json +10 -0
README.md
CHANGED
|
@@ -1,3 +1,23 @@
|
|
| 1 |
-
---
|
| 2 |
-
|
| 3 |
-
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
language:
|
| 3 |
+
- lt
|
| 4 |
+
license: apache-2.0
|
| 5 |
+
tags:
|
| 6 |
+
- llama
|
| 7 |
+
- lithuanian
|
| 8 |
+
- from-scratch
|
| 9 |
+
- reasoning
|
| 10 |
+
---
|
| 11 |
+
|
| 12 |
+
# L1 (259M) – Lietuviškas kalbos modelis nuo nulio
|
| 13 |
+
|
| 14 |
+
**L1** yra 259M parametrų Llama architektūros kalbos modelis, apmokytas nuo nulio lietuvių kalbai ir žingsnis po žingsnio matematiniam samprotavimui (`<think>`).
|
| 15 |
+
|
| 16 |
+
## Mokymo eiga
|
| 17 |
+
- **Architektūra:** Llama (259M parametrų, 512 konteksto langas, custom BPE tokenizatorius).
|
| 18 |
+
- **Bazinis mokymas (Pre-training):** 770.9 mln. tokenų iš lietuviško `FineWeb-2` rinkinio naudojant WSD (*Warmup-Stable-Decay*) grafiką.
|
| 19 |
+
- **SFT (Supervised Fine-Tuning):** 81 671 pavyzdys su *loss masking* (`MBZUAI/Bactrian-X` LT, `CohereForAI/aya_dataset`, `CohereForAI/aya_collection_language_split`, sintetinė `<think>` matematika ir GSM8K).
|
| 20 |
+
|
| 21 |
+
## Testų rezultatai (200 unikalių užduočių, be duomenų nutekinimo)
|
| 22 |
+
- **Matematika (nauji skaičiai):** 82 / 100
|
| 23 |
+
- **Lietuvių kalba (bendros žinios):** 17 / 100
|
config.json
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"LlamaForCausalLM"
|
| 4 |
+
],
|
| 5 |
+
"attention_bias": false,
|
| 6 |
+
"attention_dropout": 0.0,
|
| 7 |
+
"bos_token_id": 0,
|
| 8 |
+
"dtype": "float16",
|
| 9 |
+
"eos_token_id": 0,
|
| 10 |
+
"head_dim": 64,
|
| 11 |
+
"hidden_act": "silu",
|
| 12 |
+
"hidden_size": 1024,
|
| 13 |
+
"initializer_range": 0.02,
|
| 14 |
+
"intermediate_size": 2816,
|
| 15 |
+
"max_position_embeddings": 512,
|
| 16 |
+
"mlp_bias": false,
|
| 17 |
+
"model_type": "llama",
|
| 18 |
+
"num_attention_heads": 16,
|
| 19 |
+
"num_hidden_layers": 20,
|
| 20 |
+
"num_key_value_heads": 4,
|
| 21 |
+
"pad_token_id": 1,
|
| 22 |
+
"pretraining_tp": 1,
|
| 23 |
+
"rms_norm_eps": 1e-05,
|
| 24 |
+
"rope_parameters": {
|
| 25 |
+
"rope_theta": 10000.0,
|
| 26 |
+
"rope_type": "default"
|
| 27 |
+
},
|
| 28 |
+
"tie_word_embeddings": true,
|
| 29 |
+
"transformers_version": "5.5.4",
|
| 30 |
+
"use_cache": true,
|
| 31 |
+
"vocab_size": 16384
|
| 32 |
+
}
|
generation_config.json
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_from_model_config": true,
|
| 3 |
+
"bos_token_id": 0,
|
| 4 |
+
"eos_token_id": 0,
|
| 5 |
+
"output_attentions": false,
|
| 6 |
+
"output_hidden_states": false,
|
| 7 |
+
"pad_token_id": 1,
|
| 8 |
+
"transformers_version": "5.5.4",
|
| 9 |
+
"use_cache": true
|
| 10 |
+
}
|
model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7d46f782f6c7128d097079330301b7d4e2c651c7a3f4b67c45f469b3395d8595
|
| 3 |
+
size 518101096
|
tokenizer.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
tokenizer_config.json
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"backend": "tokenizers",
|
| 3 |
+
"bos_token": "<|endoftext|>",
|
| 4 |
+
"eos_token": "<|endoftext|>",
|
| 5 |
+
"is_local": true,
|
| 6 |
+
"model_max_length": 1000000000000000019884624838656,
|
| 7 |
+
"pad_token": "<|padding|>",
|
| 8 |
+
"tokenizer_class": "TokenizersBackend",
|
| 9 |
+
"unk_token": "<|endoftext|>"
|
| 10 |
+
}
|