Text Generation
Transformers
English
finetuning
lora
qlora
unsloth
gpu
distributed
Eval Results (legacy)
Instructions to use lilbablo/humigencev2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use lilbablo/humigencev2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="lilbablo/humigencev2")# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("lilbablo/humigencev2", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use lilbablo/humigencev2 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "lilbablo/humigencev2" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "lilbablo/humigencev2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/lilbablo/humigencev2
- SGLang
How to use lilbablo/humigencev2 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 "lilbablo/humigencev2" \ --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": "lilbablo/humigencev2", "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 "lilbablo/humigencev2" \ --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": "lilbablo/humigencev2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Unsloth Desktop
- Docker Model Runner
How to use lilbablo/humigencev2 with Docker Model Runner:
docker model run hf.co/lilbablo/humigencev2
Download tests/test_gpu_detection.py from lilbablo/humigencev2: direct link, hf CLI and curl.
- Browser
- Download file 1.91 kB
-
https://huggingface.co/lilbablo/humigencev2/resolve/main/tests/test_gpu_detection.py
- Command line
-
hf download hf://lilbablo/humigencev2/tests/test_gpu_detection.py
-
curl -L -o test_gpu_detection.py https://huggingface.co/lilbablo/humigencev2/resolve/main/tests/test_gpu_detection.py
1.91 kB
| #!/usr/bin/env python3 | |
| """ | |
| Test GPU detection functionality | |
| """ | |
| import pytest | |
| import sys | |
| from pathlib import Path | |
| # Add the parent directory to the path so we can import from cli | |
| sys.path.insert(0, str(Path(__file__).parent.parent)) | |
| from cli.main import detect_gpus, choose_training_mode | |
| def test_gpu_detection(): | |
| """Test GPU detection returns valid results""" | |
| gpu_count, gpus = detect_gpus() | |
| # Should return valid results (even if 0 GPUs) | |
| assert isinstance(gpu_count, int) | |
| assert isinstance(gpus, list) | |
| assert gpu_count >= 0 | |
| assert len(gpus) == gpu_count | |
| # If GPUs are detected, they should have required fields | |
| for gpu in gpus: | |
| assert "index" in gpu | |
| assert "name" in gpu | |
| assert "memory" in gpu | |
| assert isinstance(gpu["index"], int) | |
| assert isinstance(gpu["name"], str) | |
| assert isinstance(gpu["memory"], str) | |
| def test_training_mode_selection(): | |
| """Test training mode selection logic""" | |
| # Test with no GPUs | |
| result = choose_training_mode(0, []) | |
| assert result is None | |
| # Test with single GPU | |
| single_gpu = [{"index": 0, "name": "Test GPU", "memory": "8GB"}] | |
| result = choose_training_mode(1, single_gpu) | |
| assert result == "single" | |
| # Test with multiple GPUs (would prompt user in real usage) | |
| multi_gpus = [ | |
| {"index": 0, "name": "GPU 0", "memory": "8GB"}, | |
| {"index": 1, "name": "GPU 1", "memory": "8GB"} | |
| ] | |
| # This would normally prompt the user, so we can't test the full flow | |
| # But we can test that the function can be called | |
| try: | |
| result = choose_training_mode(2, multi_gpus) | |
| # If it returns without error, that's good | |
| assert result is not None | |
| except Exception: | |
| # If it prompts for user input, that's expected in test environment | |
| pass | |
| if __name__ == "__main__": | |
| pytest.main([__file__]) | |