Text Generation
Transformers
Safetensors
qwen2
lexi
reallexi
conversational
text-generation-inference
Instructions to use Reallexi-llc/Lexi-1B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Reallexi-llc/Lexi-1B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Reallexi-llc/Lexi-1B") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Reallexi-llc/Lexi-1B") model = AutoModelForCausalLM.from_pretrained("Reallexi-llc/Lexi-1B", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Reallexi-llc/Lexi-1B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Reallexi-llc/Lexi-1B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Reallexi-llc/Lexi-1B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Reallexi-llc/Lexi-1B
- SGLang
How to use Reallexi-llc/Lexi-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 "Reallexi-llc/Lexi-1B" \ --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": "Reallexi-llc/Lexi-1B", "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 "Reallexi-llc/Lexi-1B" \ --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": "Reallexi-llc/Lexi-1B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Reallexi-llc/Lexi-1B with Docker Model Runner:
docker model run hf.co/Reallexi-llc/Lexi-1B
Download model_surgery.json from Reallexi-llc/Lexi-1B: direct link, hf CLI and curl.
- Browser
- Download file 2.74 kB
-
https://huggingface.co/Reallexi-llc/Lexi-1B/resolve/main/model_surgery.json
- Command line
-
hf download hf://Reallexi-llc/Lexi-1B/model_surgery.json
-
curl -L -o model_surgery.json https://huggingface.co/Reallexi-llc/Lexi-1B/resolve/main/model_surgery.json
2.74 kB
| { | |
| "model_name": "Lexi 1.001B", | |
| "base_model_type": "qwen2", | |
| "original_parameters": 494032768, | |
| "expanded_parameters": 1001053824, | |
| "layer_map": [ | |
| 0, | |
| 1, | |
| 2, | |
| 3, | |
| 4, | |
| 5, | |
| 6, | |
| 7, | |
| 8, | |
| 9, | |
| 10, | |
| 11, | |
| 12, | |
| 12, | |
| 12, | |
| 12, | |
| 12, | |
| 12, | |
| 12, | |
| 12, | |
| 12, | |
| 12, | |
| 12, | |
| 12, | |
| 12, | |
| 12, | |
| 12, | |
| 12, | |
| 12, | |
| 12, | |
| 12, | |
| 12, | |
| 12, | |
| 12, | |
| 12, | |
| 12, | |
| 12, | |
| 12, | |
| 12, | |
| 12, | |
| 12, | |
| 12, | |
| 12, | |
| 12, | |
| 12, | |
| 12, | |
| 12, | |
| 13, | |
| 14, | |
| 15, | |
| 16, | |
| 17, | |
| 18, | |
| 19, | |
| 20, | |
| 21, | |
| 22, | |
| 23 | |
| ], | |
| "inserted_layers": [ | |
| 13, | |
| 14, | |
| 15, | |
| 16, | |
| 17, | |
| 18, | |
| 19, | |
| 20, | |
| 21, | |
| 22, | |
| 23, | |
| 24, | |
| 25, | |
| 26, | |
| 27, | |
| 28, | |
| 29, | |
| 30, | |
| 31, | |
| 32, | |
| 33, | |
| 34, | |
| 35, | |
| 36, | |
| 37, | |
| 38, | |
| 39, | |
| 40, | |
| 41, | |
| 42, | |
| 43, | |
| 44, | |
| 45, | |
| 46 | |
| ], | |
| "initialization": "identity", | |
| "status": "trained_needs_quality_review", | |
| "reload_and_finite_logits": true, | |
| "standalone_base": true, | |
| "identity_probe_preserved": true, | |
| "quality_validated": false, | |
| "generation_verification": { | |
| "baseline": { | |
| "continuation": { | |
| "visible": true, | |
| "format": "raw" | |
| }, | |
| "arithmetic": { | |
| "visible": true, | |
| "format": "chat", | |
| "correct": true | |
| } | |
| }, | |
| "result": { | |
| "continuation": { | |
| "visible": true, | |
| "format": "raw" | |
| }, | |
| "arithmetic": { | |
| "visible": true, | |
| "format": "chat", | |
| "correct": true | |
| } | |
| } | |
| }, | |
| "memory_strategy": "streamed-safetensors", | |
| "verification_cpu_retry": false, | |
| "tool_owner": "Reallexi LLC", | |
| "tool_copyright": "Copyright (c) 2026 Reallexi LLC. All rights reserved.", | |
| "tool_license": "Apache-2.0", | |
| "core_backlink": "https://llm.reallexi.io", | |
| "source": "/app/backend/data/huggingface/hub/models--reallexi--lexi-resume-v6/snapshots/de6b444d5f750b5f8a9d319f5f2da73ef0b6da1c", | |
| "source_revision": "de6b444d5f750b5f8a9d319f5f2da73ef0b6da1c", | |
| "trainable_parameters": 1001053824, | |
| "training_tokens": 25500, | |
| "repeated_passes": 0, | |
| "before_evaluation": { | |
| "loss": 3.3852123767137527, | |
| "tokens": 2040, | |
| "blocks": 8 | |
| }, | |
| "after_evaluation": { | |
| "loss": 2.2219553105533123, | |
| "tokens": 2040, | |
| "blocks": 8 | |
| }, | |
| "loss_improved": true, | |
| "train_sha256": "7e464bcc9b85ffac57ca2ee36d59555c7daf0427e427c1763c3b34d4c6ba3630", | |
| "eval_sha256": "91c3ef0fea8d8e0d111b2e47e18e4a9b122127e09d01be5226a3491a793e1b88", | |
| "healing_options": { | |
| "steps": 100, | |
| "sequence_length": 256, | |
| "accumulation": 1, | |
| "eval_blocks": 8, | |
| "learning_rate": 1e-05, | |
| "train_scope": "full", | |
| "device": "cuda:0", | |
| "optimizer": "adamw" | |
| } | |
| } | |