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
| [build-system] | |
| requires = ["setuptools>=68", "wheel"] | |
| build-backend = "setuptools.backends.legacy:build" | |
| [project] | |
| name = "llm-go" | |
| version = "0.1.0" | |
| description = "A Go-specialized large language model trained on all Golang versions, Fiber, Cobra, and Go best practices" | |
| authors = [{ name = "llm-go contributors" }] | |
| license = { text = "Apache-2.0" } | |
| requires-python = ">=3.12" | |
| keywords = ["llm", "golang", "go", "code-generation", "transformer", "tensorflow"] | |
| classifiers = [ | |
| "Development Status :: 3 - Alpha", | |
| "Intended Audience :: Developers", | |
| "License :: OSI Approved :: Apache Software License", | |
| "Programming Language :: Python :: 3.12", | |
| "Topic :: Scientific/Engineering :: Artificial Intelligence", | |
| ] | |
| dependencies = [ | |
| "tensorflow>=2.16.0", | |
| "keras>=3.3.0", | |
| "tokenizers>=0.19.0", | |
| "datasets>=2.19.0", | |
| "huggingface-hub>=0.23.0", | |
| "transformers>=4.41.0", | |
| "numpy>=1.26.0", | |
| "pandas>=2.2.0", | |
| "tqdm>=4.66.0", | |
| "requests>=2.31.0", | |
| "GitPython>=3.1.43", | |
| "PyGithub>=2.3.0", | |
| "rich>=13.7.0", | |
| "click>=8.1.7", | |
| "pyyaml>=6.0.1", | |
| "tensorboard>=2.16.0", | |
| "scipy>=1.13.0", | |
| "scikit-learn>=1.4.0", | |
| "accelerate>=0.30.0", | |
| "evaluate>=0.4.2", | |
| "rouge-score>=0.1.2", | |
| "sentencepiece>=0.2.0", | |
| ] | |
| [project.optional-dependencies] | |
| dev = [ | |
| "pytest>=8.2.0", | |
| "pytest-cov>=5.0.0", | |
| "black>=24.4.0", | |
| "ruff>=0.4.0", | |
| "mypy>=1.10.0", | |
| "pre-commit>=3.7.0", | |
| ] | |
| gpu = [ | |
| "tensorflow[and-cuda]>=2.16.0", | |
| ] | |
| [project.scripts] | |
| llm-go-collect = "llm_go.scripts.collect:main" | |
| llm-go-tokenize = "llm_go.scripts.tokenize:main" | |
| llm-go-train = "llm_go.scripts.train:main" | |
| llm-go-evaluate = "llm_go.scripts.evaluate:main" | |
| llm-go-deploy = "llm_go.scripts.deploy:main" | |
| llm-go-generate = "llm_go.scripts.generate:main" | |
| [tool.setuptools.packages.find] | |
| where = ["src"] | |
| [tool.ruff] | |
| line-length = 100 | |
| target-version = "py312" | |
| select = ["E", "F", "I", "N", "W", "UP"] | |
| [tool.black] | |
| line-length = 100 | |
| target-version = ["py312"] | |
| [tool.mypy] | |
| python_version = "3.12" | |
| strict = true | |
| ignore_missing_imports = true | |
| [tool.pytest.ini_options] | |
| testpaths = ["tests"] | |
| addopts = "--cov=llm_go --cov-report=term-missing" | |