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
Download tests/test_synthetic_data.py from minagayid/ELLM: direct link, hf CLI and curl.
- Browser
- Download file 1.59 kB
-
https://huggingface.co/minagayid/ELLM/resolve/main/tests/test_synthetic_data.py
- Command line
-
hf download hf://minagayid/ELLM/tests/test_synthetic_data.py
-
curl -L -o test_synthetic_data.py https://huggingface.co/minagayid/ELLM/resolve/main/tests/test_synthetic_data.py
1.59 kB
| import unittest | |
| from ellm.triage import build_messages, parse_advisory_label | |
| from training.synthetic_data import LABELS, build_split, make_case, policy_label | |
| import random | |
| class SyntheticDataTests(unittest.TestCase): | |
| def test_balanced_splits_match_reference_policy_without_identity_leak(self): | |
| rows = build_split("check", 12, 12345) | |
| self.assertEqual(len(rows), 12 * len(LABELS)) | |
| self.assertEqual({label: sum(row["label"] == label for row in rows) for label in LABELS}, {label: 12 for label in LABELS}) | |
| for row in rows: | |
| self.assertEqual(policy_label(row["features"]), row["label"]) | |
| prompt = build_messages(row["features"])[1]["content"] | |
| self.assertNotIn(row["features"]["case_id"], prompt) | |
| self.assertNotIn("-release", row["features"]["case_id"]) | |
| def test_gate_threshold_edges(self): | |
| rng = random.Random(7) | |
| ready = make_case("RELEASE", rng, "edge") | |
| ready["claim_age_days"] = 29 | |
| self.assertEqual(policy_label(ready), "WAIT") | |
| ready["claim_age_days"] = 30 | |
| ready["verification_span_days"] = 29 | |
| self.assertEqual(policy_label(ready), "WAIT") | |
| ready["verification_span_days"] = 30 | |
| self.assertEqual(policy_label(ready), "RELEASE") | |
| def test_model_output_parser_fails_closed(self): | |
| self.assertEqual(parse_advisory_label("WAIT"), "WAIT") | |
| self.assertIsNone(parse_advisory_label("RELEASE because it seems likely")) | |
| self.assertIsNone(parse_advisory_label("")) | |
| if __name__ == "__main__": | |
| unittest.main() | |