{"id":16512946,"url":"https://github.com/daskol/lsp-lm","last_synced_at":"2025-07-19T20:35:29.335Z","repository":{"id":88392987,"uuid":"372460606","full_name":"daskol/lsp-lm","owner":"daskol","description":"Language Model as a Language Server","archived":false,"fork":false,"pushed_at":"2022-03-05T10:51:40.000Z","size":210,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-12T21:29:36.116Z","etag":null,"topics":["bertology","deep-learning","language-modeling","lsp","neovim-plugin","nlp"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/daskol.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-05-31T10:00:43.000Z","updated_at":"2024-02-02T02:53:32.000Z","dependencies_parsed_at":"2023-03-13T18:24:56.110Z","dependency_job_id":null,"html_url":"https://github.com/daskol/lsp-lm","commit_stats":{"total_commits":34,"total_committers":3,"mean_commits":"11.333333333333334","dds":"0.23529411764705888","last_synced_commit":"46c1afcdc092651976958034e0680dd16a0bfe55"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daskol%2Flsp-lm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daskol%2Flsp-lm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daskol%2Flsp-lm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daskol%2Flsp-lm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/daskol","download_url":"https://codeload.github.com/daskol/lsp-lm/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241482101,"owners_count":19969850,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bertology","deep-learning","language-modeling","lsp","neovim-plugin","nlp"],"created_at":"2024-10-11T16:06:43.740Z","updated_at":"2025-03-02T09:17:33.885Z","avatar_url":"https://github.com/daskol.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LSP: Language Model\n\n*Language Model as a Language Server*\n\n## Overview\n\n### Features\n\n- [x] Completion (context-aware continuation sudgestions).\n- [ ] Diagnostics (spelling, grammar, code correctness, etc).\n- [ ] Go to Definition (aka thesaurus for natural languages or symbol definition for programming languages).\n\n## Usage\n\nAt the moment there is only one implementation in Python which are aimed in\ndebugging interfaces and model evaluation. So, in order to run dev\nimplementation one can do the following in shell.\n```shell\nlsp-lm serve  # stdio:\n```\nWith the command above one starts a language server to communicate over standard\nI/O streams.\n\nIn order to serve pretrained HuggingFace model (e.g. CodeBERT base for MLM) one can run the following. We assume that model config and model weights in the same directory.\n```shell\npython -m lsp serve -m hf -M .../huggingface.co/microsoft/codebert-base-mlm tcp://127.0.0.1:5272\n```\n\n### IPC\n\nIn order to use standard inter-procedural communication channels, one can start\na language server to listen Unix domain socket (UDS) as follows.\n```shell\nlsp-lm serve unix://path/to/unix/domain/socket\n```\n\n### TCP\n\nIn case of modern multi-host environment, one can want to listen public TCP/IP\ninterface for remote access to a language server. So, serving TCP/IP (both v4\nand v6) could be achieved with the command below.\n```shell\nlsp-lm serve tcp://0.0.0.0:5272\n```\nIn order to serve IPv4 or IPv6 interfaces one should use URI schemata `tcp4://`\nand `tcp6://` correspondently. Default port is `5272`.\n\nAlso, SSL/TLS could be used in order to protect connection in public or\nunprotected networks with specifying certificate, private key, and (optional) password\nfiles.\n```shell\nlsp-lm serve \\\n    --tls-cert cert.pem --tls-key key.pem --tls-pass password.txt \\\n    tcp://0.0.0.0:5272\n```\nCertificate and private key could be bundled in the same container. In this\ninstance one can omit `--tls-key` option. Password option is mandatory only if\nprivate key is encrypted.\n\nSurely, self-signed certificates are allowed. As a mild reminder, both\ncertificate and (encrypted) private key could be generated with OpenSSL as\nfollows.\n```shell\ncat password.txt\n# strong-password-in-plain-text\nopenssl req -new -x509 -days 365 -out cert.pem -keyout key.pem -passout file:password.txt\nopenssl rsa -in key.pem -passin file:password.txt -check -noout\n# RSA key ok\n```\n\n## Development with Docker\n\nIn order to develop on different platforms we uses custom docker image for\nnon-priviledge user based on Nvidia CUDA image. Image is parametrized by user\nname and user ID in a host system. The latter is crucial thing in binding host\nvolumes.\n\n```bash\ndocker build -t lsp-lm --build-arg UID=$(id -u) .\ndocker run --rm -ti -e TERM=$TERM -v $(pwd):/workspace lsp-lm\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaskol%2Flsp-lm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdaskol%2Flsp-lm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaskol%2Flsp-lm/lists"}