Text Generation
Transformers
LiteRT
LiteRT-LM
English
gemma4
lora
character
roleplay
on-device
conversational
MDRG
Factorial-Omega
Instructions to use efficiencyx/Jun-LoRA-E2B-LiteRT with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use efficiencyx/Jun-LoRA-E2B-LiteRT with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="efficiencyx/Jun-LoRA-E2B-LiteRT")# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("efficiencyx/Jun-LoRA-E2B-LiteRT", device_map="auto") - LiteRT
How to use efficiencyx/Jun-LoRA-E2B-LiteRT with LiteRT:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- LiteRT-LM
How to use efficiencyx/Jun-LoRA-E2B-LiteRT with LiteRT-LM:
# LiteRT-LM runs on various platforms (Android, iOS, Windows, Linux, macOS, IoT, Web/WASM) # and supports many APIs (C++, Python, Kotlin, Swift, JavaScript, Flutter). # For platform-specific integration guides, please refer to the official developer website: # https://ai.google.dev/edge/litert-lm # To try LiteRT-LM, the easiest way is to use our CLI tool. # 1. Install the LiteRT-LM CLI tool: pip install -U litert-lm # 2. Download and run this model locally: # See: https://ai.google.dev/edge/litert-lm/cli # A single .litertlm file in the repo is picked automatically; otherwise the CLI asks which one to run # (or pass its name right after the repo id). litert-lm run \ --from-huggingface-repo=efficiencyx/Jun-LoRA-E2B-LiteRT \ --prompt="Write me a poem"
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use efficiencyx/Jun-LoRA-E2B-LiteRT with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "efficiencyx/Jun-LoRA-E2B-LiteRT" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "efficiencyx/Jun-LoRA-E2B-LiteRT", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/efficiencyx/Jun-LoRA-E2B-LiteRT
- SGLang
How to use efficiencyx/Jun-LoRA-E2B-LiteRT 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 "efficiencyx/Jun-LoRA-E2B-LiteRT" \ --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": "efficiencyx/Jun-LoRA-E2B-LiteRT", "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 "efficiencyx/Jun-LoRA-E2B-LiteRT" \ --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": "efficiencyx/Jun-LoRA-E2B-LiteRT", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use efficiencyx/Jun-LoRA-E2B-LiteRT with Docker Model Runner:
docker model run hf.co/efficiencyx/Jun-LoRA-E2B-LiteRT
v9 E2B channelwise int4 + fp16 KV: talks on the LiteRT-LM 0.20 GPU backend, blockwise build stays at 4f44fe1
Browse files- README.md +7 -5
- model.litertlm +2 -2
README.md
CHANGED
|
@@ -43,17 +43,19 @@ See the [GGUF card](https://huggingface.co/efficiencyx/Jun-LoRA-E2B-GGUF) for wh
|
|
| 43 |
| | |
|
| 44 |
|:--|:--|
|
| 45 |
| File | `model.litertlm` |
|
| 46 |
-
| Size | 2.
|
| 47 |
| Checkpoint | step 750 of 771, the one the GGUFs ship |
|
| 48 |
-
| Weights | int4
|
|
|
|
| 49 |
| Embedder | externalized |
|
| 50 |
| KV cache | 8192 tokens |
|
| 51 |
-
|
|
| 52 |
-
|
|
|
|
|
| 53 |
|
| 54 |
Text only, with no vision or audio encoder.
|
| 55 |
|
| 56 |
-
|
| 57 |
|
| 58 |
## Usage
|
| 59 |
|
|
|
|
| 43 |
| | |
|
| 44 |
|:--|:--|
|
| 45 |
| File | `model.litertlm` |
|
| 46 |
+
| Size | 2.39 GB |
|
| 47 |
| Checkpoint | step 750 of 771, the one the GGUFs ship |
|
| 48 |
+
| Weights | int4 channelwise for FFN and attention, int8 channelwise for the per-layer embedding projections (recipe `gemma4_mixed48`), int4 channelwise for both embedding tables |
|
| 49 |
+
| Activations | fp16, KV cache fp16 |
|
| 50 |
| Embedder | externalized |
|
| 51 |
| KV cache | 8192 tokens |
|
| 52 |
+
| Prefill | 128 and 1024 token signatures |
|
| 53 |
+
| Exported with | `litert-torch` 0.10.0 (`experimental_use_fp16`, `apply_gpu_composites`), `ai-edge-quantizer` 0.10.1, packed with `litert-lm-builder` 0.20.0 (weights in their own sections) |
|
| 54 |
+
| Runtime | **LiteRT-LM 0.19.0 or newer** |
|
| 55 |
|
| 56 |
Text only, with no vision or audio encoder.
|
| 57 |
|
| 58 |
+
Earlier builds used 32-wide int4 blocks. From LiteRT-LM 0.20 on, the GPU backend turns those into nothing but `<pad>` tokens, so this build is channelwise, the same layout Google ships its own Gemma 4 files in. On a moto g86 (GPU, LiteRT-LM 0.20.0) it reads the system prompt about twice as fast as the blockwise build and writes around 3 tokens per second. It was smoke tested there, not put through the held-out eval the GGUFs got. The blockwise file is still at revision `4f44fe1`, for LiteRT-LM 0.18 and 0.19.
|
| 59 |
|
| 60 |
## Usage
|
| 61 |
|
model.litertlm
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a75eb777f636b714b18968d65e2dd194af28fe1de8afe1c4c21d3545516fea4c
|
| 3 |
+
size 2389655552
|