Text Generation
Transformers
Safetensors
qwen2
code-generation
myanmar
burmese
qwen
qwen2.5
qwen2.5-coder
conversational
Eval Results (legacy)
text-generation-inference
Instructions to use amkyawdev/amk-coder-v2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use amkyawdev/amk-coder-v2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="amkyawdev/amk-coder-v2") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("amkyawdev/amk-coder-v2") model = AutoModelForCausalLM.from_pretrained("amkyawdev/amk-coder-v2", 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]:])) - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use amkyawdev/amk-coder-v2 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "amkyawdev/amk-coder-v2" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "amkyawdev/amk-coder-v2", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/amkyawdev/amk-coder-v2
- SGLang
How to use amkyawdev/amk-coder-v2 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 "amkyawdev/amk-coder-v2" \ --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": "amkyawdev/amk-coder-v2", "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 "amkyawdev/amk-coder-v2" \ --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": "amkyawdev/amk-coder-v2", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use amkyawdev/amk-coder-v2 with Docker Model Runner:
docker model run hf.co/amkyawdev/amk-coder-v2
Add Apache-2.0 LICENSE file
Browse files
LICENSE
ADDED
|
@@ -0,0 +1,84 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Apache License
|
| 2 |
+
Version 2.0, January 2004
|
| 3 |
+
http://www.apache.org/licenses/
|
| 4 |
+
|
| 5 |
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
| 6 |
+
|
| 7 |
+
1. Definitions.
|
| 8 |
+
|
| 9 |
+
"License" shall mean the terms and conditions for use, reproduction,
|
| 10 |
+
and distribution as defined by Sections 1 through 9 of this document.
|
| 11 |
+
|
| 12 |
+
"Licensor" shall mean the copyright owner or entity authorized by
|
| 13 |
+
the copyright owner that is granting the License.
|
| 14 |
+
|
| 15 |
+
"Legal Entity" shall mean the union of the acting entity and all
|
| 16 |
+
other entities that control, are controlled by, or are under common
|
| 17 |
+
control with that entity.
|
| 18 |
+
|
| 19 |
+
"You" (or "Your") shall mean an individual or Legal Entity
|
| 20 |
+
exercising permissions granted by this License.
|
| 21 |
+
|
| 22 |
+
"Source" form shall mean the preferred form for making modifications,
|
| 23 |
+
including but not limited to software source code, documentation
|
| 24 |
+
source, and configuration files.
|
| 25 |
+
|
| 26 |
+
"Object" form shall mean any form resulting from mechanical
|
| 27 |
+
transformation or translation of a Source form, including but
|
| 28 |
+
not limited to compiled object code, generated documentation,
|
| 29 |
+
and conversions to other media types.
|
| 30 |
+
|
| 31 |
+
2. Grant of Copyright License.
|
| 32 |
+
|
| 33 |
+
Subject to the terms and conditions of this License, Licensor hereby
|
| 34 |
+
grants You a worldwide, royalty-free, non-sublicensable, non-exclusive,
|
| 35 |
+
perpetual license to exercise the Licensed Material in developing,
|
| 36 |
+
making, using, offering for sale, selling, importing, and otherwise
|
| 37 |
+
transferring the Licensed Material.
|
| 38 |
+
|
| 39 |
+
3. Grant of Patent License.
|
| 40 |
+
|
| 41 |
+
Licensor hereby grants You a worldwide, royalty-free, non-sublicensable,
|
| 42 |
+
non-exclusive, perpetual license to exercise the Patent Rights in the
|
| 43 |
+
Licensed Material to make, have made, use, offer to sell, sell,
|
| 44 |
+
import, and otherwise transfer the Licensed Material.
|
| 45 |
+
|
| 46 |
+
4. Redistribution.
|
| 47 |
+
|
| 48 |
+
You may reproduce and distribute copies of the Licensed Material in any
|
| 49 |
+
medium, with or without modifications, provided that You meet the
|
| 50 |
+
following conditions:
|
| 51 |
+
|
| 52 |
+
(a) You must give any other recipients of the Licensed Material a copy
|
| 53 |
+
of this License; and
|
| 54 |
+
|
| 55 |
+
(b) You must cause any modified files to carry prominent notices stating
|
| 56 |
+
that You changed the files; and
|
| 57 |
+
|
| 58 |
+
(c) You must retain, in the Source form of the Licensed Material,
|
| 59 |
+
all copyright, patent, trademark, and attribution notices.
|
| 60 |
+
|
| 61 |
+
5. Disclaimer of Warranty.
|
| 62 |
+
|
| 63 |
+
THE LICENSED MATERIAL IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND.
|
| 64 |
+
|
| 65 |
+
6. Limitation of Liability.
|
| 66 |
+
|
| 67 |
+
IN NO EVENT SHALL LICENSOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
| 68 |
+
LIABILITY ARISING FROM THE USE OF THE LICENSED MATERIAL.
|
| 69 |
+
|
| 70 |
+
END OF TERMS AND CONDITIONS
|
| 71 |
+
|
| 72 |
+
Copyright 2024 amkyawdev
|
| 73 |
+
|
| 74 |
+
Licensed under the Apache License, Version 2.0 (the "License");
|
| 75 |
+
you may not use this file except in compliance with the License.
|
| 76 |
+
You may obtain a copy of the License at
|
| 77 |
+
|
| 78 |
+
http://www.apache.org/licenses/LICENSE-2.0
|
| 79 |
+
|
| 80 |
+
Unless required by applicable law or agreed to in writing, software
|
| 81 |
+
distributed under the License is distributed on an "AS IS" BASIS,
|
| 82 |
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 83 |
+
See the License for the specific language governing permissions and
|
| 84 |
+
limitations under the License.
|