Text Generation
Transformers
Safetensors
qwen3
llama-factory
full
Generated from Trainer
conversational
text-generation-inference
Instructions to use ayh015/myLightningOPD with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ayh015/myLightningOPD with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="ayh015/myLightningOPD") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("ayh015/myLightningOPD") model = AutoModelForCausalLM.from_pretrained("ayh015/myLightningOPD", 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=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use ayh015/myLightningOPD with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ayh015/myLightningOPD" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ayh015/myLightningOPD", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/ayh015/myLightningOPD
- SGLang
How to use ayh015/myLightningOPD 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 "ayh015/myLightningOPD" \ --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": "ayh015/myLightningOPD", "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 "ayh015/myLightningOPD" \ --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": "ayh015/myLightningOPD", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use ayh015/myLightningOPD with Docker Model Runner:
docker model run hf.co/ayh015/myLightningOPD
| [build-system] | |
| requires = [ | |
| "packaging", | |
| "setuptools >= 49.4.0", | |
| "wheel", | |
| ] | |
| build-backend = "setuptools.build_meta" | |
| [tool.isort] | |
| profile = "black" # black-compatible | |
| line_length = 119 # should match black parameters | |
| ignore_whitespace = true # ignore whitespace for compatibility with the initial style | |
| py_version = 310 # python 3.10 as a target version | |
| sections = ["FUTURE", "STDLIB", "THIRDPARTY", "FIRSTPARTY", "LOCALFOLDER"] | |
| default_section = "THIRDPARTY" | |
| extend_skip = ["setup.py", "docs/source/conf.py"] | |
| known_first_party = ["slime", "slime_plugins"] | |
| known_third_party = ["megatron", "wandb", "ray", "transformers"] | |
| src_paths = ["slime", "slime_plugins"] | |
| [tool.black] | |
| line_length = 119 | |
| [tool.ruff] | |
| line-length = 119 | |
| [tool.pytest.ini_options] | |
| # durations=0 will display all tests execution time, sorted in ascending order starting from from the slowest one. | |
| # -vv will also display tests with duration = 0.00s | |
| addopts = "--verbose --pyargs --durations=0 --strict-markers" # always add these arguments to pytest | |
| testpaths = ["./tests"] # must be an explicit path to avoid importing another "tests" module | |
| # directories to ignore when discovering tests | |
| norecursedirs = [ | |
| "external", | |
| "examples", | |
| "docs", | |
| "scripts", | |
| "tools", | |
| "tutorials", | |
| "*.egg", | |
| ".*", | |
| "_darcs", | |
| "build", | |
| "CVS", | |
| "dist", | |
| "venv", | |
| "{arch}", | |
| ] | |
| # markers to select tests, use `pytest --markers` to see all available markers, `pytest -m "<marker>"` to select tests | |
| markers = [ | |
| "unit: marks unit test, i.e. testing a single, well isolated functionality (deselect with '-m \"not unit\"')", | |
| "integration: marks test checking the elements when integrated into subsystems (deselect with '-m \"not integration\"')", | |
| "system: marks test working at the highest integration level (deselect with '-m \"not system\"')", | |
| "acceptance: marks test checking whether the developed product/model passes the user defined acceptance criteria (deselect with '-m \"not acceptance\"')", | |
| "docs: mark tests related to documentation (deselect with '-m \"not docs\"')", | |
| "skipduringci: marks tests that are skipped ci as they are addressed by Jenkins jobs but should be run to test user setups", | |
| "pleasefixme: marks tests that are broken and need fixing", | |
| ] | |