Instructions to use LesterCerioli/LLM-GO with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use LesterCerioli/LLM-GO with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="LesterCerioli/LLM-GO")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("LesterCerioli/LLM-GO", dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use LesterCerioli/LLM-GO with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "LesterCerioli/LLM-GO" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "LesterCerioli/LLM-GO", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/LesterCerioli/LLM-GO
- SGLang
How to use LesterCerioli/LLM-GO 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 "LesterCerioli/LLM-GO" \ --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": "LesterCerioli/LLM-GO", "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 "LesterCerioli/LLM-GO" \ --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": "LesterCerioli/LLM-GO", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use LesterCerioli/LLM-GO with Docker Model Runner:
docker model run hf.co/LesterCerioli/LLM-GO
| import pytest | |
| from llm_go.data.go_best_practices import GoProjectTemplates, GoLayoutValidator | |
| class TestGoLayoutValidator: | |
| def test_correct_layout(self): | |
| paths = [ | |
| "cmd/server/main.go", | |
| "cmd/worker/main.go", | |
| "internal/config/config.go", | |
| "internal/handler/handler.go", | |
| "go.mod", | |
| ] | |
| result = GoLayoutValidator.validate(paths) | |
| assert result["has_cmd_at_root"] is True | |
| assert result["cmd_has_main_go"] is True | |
| assert result["no_nested_cmd"] is True | |
| assert GoLayoutValidator.layout_score(result) == 1.0 | |
| def test_missing_cmd(self): | |
| paths = ["main.go", "internal/config/config.go", "go.mod"] | |
| result = GoLayoutValidator.validate(paths) | |
| assert result["has_cmd_at_root"] is False | |
| assert result["cmd_has_main_go"] is False | |
| def test_nested_cmd_flagged(self): | |
| paths = [ | |
| "cmd/server/main.go", | |
| "internal/tools/cmd/helper/main.go", # nested — bad practice | |
| ] | |
| result = GoLayoutValidator.validate(paths) | |
| assert result["no_nested_cmd"] is False | |
| def test_layout_score_range(self): | |
| paths = ["cmd/server/main.go"] | |
| score = GoLayoutValidator.layout_score(GoLayoutValidator.validate(paths)) | |
| assert 0.0 <= score <= 1.0 | |
| class TestGoProjectTemplates: | |
| def test_generates_examples(self): | |
| tpl = GoProjectTemplates() | |
| examples = tpl.all_examples() | |
| assert len(examples) > 50 | |
| def test_cmd_main_contains_package_main(self): | |
| tpl = GoProjectTemplates() | |
| ex = tpl._cmd_main("1.22", "server", "Server") | |
| assert "package main" in ex | |
| def test_cmd_main_respects_layout_rule(self): | |
| tpl = GoProjectTemplates() | |
| ex = tpl._cmd_main("1.22", "server", "Server") | |
| # Must mention cmd/server or cmd/<app> path | |
| assert "cmd/" in ex or "cmd/" in ex | |
| def test_fiber_server_template(self): | |
| tpl = GoProjectTemplates() | |
| ex = tpl._fiber_server("1.24", "api") | |
| assert "fiber.New" in ex | |
| assert "package main" in ex | |
| assert "cmd/" in ex | |
| def test_cobra_main_template(self): | |
| tpl = GoProjectTemplates() | |
| ex = tpl._cobra_main("1.24", "cli") | |
| assert "cmd.Execute" in ex | |
| assert "package main" in ex | |
| def test_go_project_layout_constant(self): | |
| from llm_go.data.go_best_practices import GO_PROJECT_LAYOUT | |
| assert "cmd/" in GO_PROJECT_LAYOUT | |
| assert "ALWAYS at root" in GO_PROJECT_LAYOUT | |
| assert "internal/" in GO_PROJECT_LAYOUT | |