Instructions to use ComputationalLinguisticsLab/LexisLM-1B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ComputationalLinguisticsLab/LexisLM-1B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="ComputationalLinguisticsLab/LexisLM-1B")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("ComputationalLinguisticsLab/LexisLM-1B") model = AutoModelForCausalLM.from_pretrained("ComputationalLinguisticsLab/LexisLM-1B", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use ComputationalLinguisticsLab/LexisLM-1B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ComputationalLinguisticsLab/LexisLM-1B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ComputationalLinguisticsLab/LexisLM-1B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/ComputationalLinguisticsLab/LexisLM-1B
- SGLang
How to use ComputationalLinguisticsLab/LexisLM-1B 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 "ComputationalLinguisticsLab/LexisLM-1B" \ --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": "ComputationalLinguisticsLab/LexisLM-1B", "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 "ComputationalLinguisticsLab/LexisLM-1B" \ --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": "ComputationalLinguisticsLab/LexisLM-1B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use ComputationalLinguisticsLab/LexisLM-1B with Docker Model Runner:
docker model run hf.co/ComputationalLinguisticsLab/LexisLM-1B
LexisLM-1B
LexisLM-1B is a Greek language, decoder-only model for text completion. It was pretrained for 335,000 steps on approximately 22 billion tokens from FineWeb2 and Greek Wikipedia. This release is the base model; it has not been instruction tuned for chat or question answering.
Model details
| Property | Value |
|---|---|
| Architecture | Llama-compatible causal language model |
| Transformer layers | 20 |
| Hidden size | 2,048 |
| Attention heads | 16 |
| Context length | 4,096 tokens |
| Vocabulary size | 32,004 tokens |
The repository includes the model weights in safetensors format, the configuration, and the tokenizer. It can be loaded with Hugging Face Transformers.
Usage
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "ComputationalLinguisticsLab/LexisLM-1B" # Or a local path to hf_pretrained
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id, dtype="auto", device_map="auto")
# Pretraining documents were separated by <eos>. Start a fresh document with it.
prompt = "Η Ελλάδα είναι μια χώρα"
prompt_ids = tokenizer(prompt, add_special_tokens=False, return_tensors="pt").input_ids
eos_id = torch.tensor([[tokenizer.eos_token_id]])
input_ids = torch.cat([eos_id, prompt_ids], dim=1).to(model.device)
with torch.inference_mode():
output_ids = model.generate(
input_ids,
max_new_tokens=100,
do_sample=True,
temperature=0.7,
top_p=0.9,
pad_token_id=tokenizer.pad_token_id,
)
print(tokenizer.decode(output_ids[0, input_ids.shape[1] :], skip_special_tokens=True))
Install torch, transformers, and accelerate to run this example. Keep the prompt and generated tokens within the 4,096-token context window.
Evaluation results
The following results were reported with 0 few-shot examples. Scores are shown as percentages. ARC uses normalized accuracy; the other benchmarks use their reported accuracy or multiple-choice metrics.
| Benchmark | Metric | Score | Questions |
|---|---|---|---|
| ARC-Challenge | Normalized accuracy | 25.34% | 1,168 |
| ARC-Easy | Normalized accuracy | 33.38% | 2,376 |
| MMLU | Accuracy | 23.15% | 14,042 |
| TruthfulQA | MC1 | 24.60% | 817 |
| TruthfulQA | MC2 | 43.49% | 817 |
Intended use and limitations
LexisLM-1B is intended for experimenting with Greek text generation and as a starting point for further fine-tuning. Because it is a base model, chat-style instructions may not produce reliable answers. Generated text can be inaccurate or reflect biases in the training data; review it before using it in consequential settings.
License
LexisLM-1B model weights are released under Apache-2.0. Training data included FineWeb2 (HuggingFaceFW), available under ODC-By-1.0. Dataset and underlying content rights remain with their respective holders.
- Downloads last month
- -