Text Generation
PEFT
Safetensors
Transformers
lora
research-prototype
failed-promotion
not-ready-for-deployment
Instructions to use minagayid/ELLM with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use minagayid/ELLM with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("HuggingFaceTB/SmolLM2-135M-Instruct") model = PeftModel.from_pretrained(base_model, "minagayid/ELLM") - Transformers
How to use minagayid/ELLM with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="minagayid/ELLM")# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("minagayid/ELLM", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use minagayid/ELLM with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "minagayid/ELLM" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "minagayid/ELLM", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/minagayid/ELLM
- SGLang
How to use minagayid/ELLM 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 "minagayid/ELLM" \ --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": "minagayid/ELLM", "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 "minagayid/ELLM" \ --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": "minagayid/ELLM", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use minagayid/ELLM with Docker Model Runner:
docker model run hf.co/minagayid/ELLM
File size: 1,316 Bytes
e8964d2 | 1 2 3 4 5 6 7 8 9 10 11 12 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 | from __future__ import annotations
import argparse
import json
from pathlib import Path
from .demo import main as demo_main
from .health import health_dict
def main(argv: list[str] | None = None) -> int:
parser = argparse.ArgumentParser(prog="ellm")
sub = parser.add_subparsers(dest="command", required=True)
sub.add_parser("health", help="print a dependency-light health report")
sub.add_parser("demo", help="run the fail-closed synthetic gate demo")
verify = sub.add_parser("verify-ledger", help="verify an evidence ledger hash chain")
verify.add_argument("path", type=Path)
args = parser.parse_args(argv)
if args.command == "health":
print(json.dumps(health_dict(), indent=2, sort_keys=True))
return 0
if args.command == "demo":
demo_main()
return 0
if args.command == "verify-ledger":
from .ledger import EvidenceLedger
from .policy import SourcePolicy
# Verification does not ingest data, so an intentionally minimal policy suffices.
ledger = EvidenceLedger(args.path, SourcePolicy(frozenset({"invalid.local"})))
print(json.dumps({"path": str(args.path), "records": ledger.verify_chain()}, sort_keys=True))
return 0
return 2
if __name__ == "__main__":
raise SystemExit(main())
|