Instructions to use 0ldev/Lara-350M with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use 0ldev/Lara-350M with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="0ldev/Lara-350M")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("0ldev/Lara-350M") model = AutoModelForCausalLM.from_pretrained("0ldev/Lara-350M", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use 0ldev/Lara-350M with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "0ldev/Lara-350M" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "0ldev/Lara-350M", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/0ldev/Lara-350M
- SGLang
How to use 0ldev/Lara-350M 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 "0ldev/Lara-350M" \ --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": "0ldev/Lara-350M", "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 "0ldev/Lara-350M" \ --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": "0ldev/Lara-350M", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use 0ldev/Lara-350M with Docker Model Runner:
docker model run hf.co/0ldev/Lara-350M
Configuration Parsing Warning:In UNKNOWN_FILENAME: "tokenizer_config.bos_token.__type" is required
Configuration Parsing Warning:In UNKNOWN_FILENAME: "tokenizer_config.eos_token.__type" is required
Configuration Parsing Warning:In UNKNOWN_FILENAME: "tokenizer_config.unk_token.__type" is required
Lara-350M (Pretrained)
A 350M parameter LLaMA-style language model pretrained from scratch on a custom corpus. This is the base pretrained checkpoint โ it has not yet been instruction-tuned or fine-tuned with any persona.
Architecture
- Type: LLaMA (decoder-only transformer)
- Parameters: 439,403,520
- Layers: 24
- Hidden size: 1024
- Attention heads: 16
- KV heads: 16
- Vocab size: 64,000
- Max sequence length: 2048
- Activation: SiLU (SwiGLU)
- Normalization: RMSNorm
Tokenizer
Important: This model uses a custom tokenizer trained from scratch on the training corpus. It is NOT a standard LLaMA, GPT-2, or any other pre-existing tokenizer.
- Type: BPE (Byte-Pair Encoding)
- Vocab size: 64,000
- Special tokens: BOS (
<s>), EOS (</s>), UNK (<unk>) - Training: Trained alongside the model on the same corpus
Do NOT use a standard LLaMA tokenizer with this model โ the token IDs will be completely wrong and produce garbled output.
Training
- Architecture: Custom LLaMA-350M (trained from scratch)
- Training: 100,000 iterations with AdamW optimizer
- Batch size: 32 effective (2 micro-batch x 8 grad accum x 2 GPUs)
- Learning rate: 3e-4
- Hardware: 2x NVIDIA RTX 3060 (12GB VRAM each)
- Corpus: Custom pretraining corpus
What This Is Not
This is a raw pretrained language model. It has:
- No instruction tuning
- No persona or personality
- No RLHF or DPO alignment
- No guardrails or safety training
It predicts the next token based on patterns learned during pretraining. To use it as an assistant, it would need further fine-tuning (SFT, RLHF, etc.).
Usage
from transformers import AutoModelForCausalLM, AutoTokenizer
model = AutoModelForCausalLM.from_pretrained("0ldev/Lara-350M")
tokenizer = AutoTokenizer.from_pretrained("0ldev/Lara-350M")
inputs = tokenizer("The meaning of life is", return_tensors="pt")
outputs = model.generate(**inputs, max_new_tokens=50)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
License
Apache 2.0
- Downloads last month
- 210