Instructions to use iamtarun/pycompetitive-codegen350M-qlora with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use iamtarun/pycompetitive-codegen350M-qlora with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="iamtarun/pycompetitive-codegen350M-qlora")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("iamtarun/pycompetitive-codegen350M-qlora") model = AutoModelForCausalLM.from_pretrained("iamtarun/pycompetitive-codegen350M-qlora") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use iamtarun/pycompetitive-codegen350M-qlora with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "iamtarun/pycompetitive-codegen350M-qlora" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "iamtarun/pycompetitive-codegen350M-qlora", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/iamtarun/pycompetitive-codegen350M-qlora
- SGLang
How to use iamtarun/pycompetitive-codegen350M-qlora 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 "iamtarun/pycompetitive-codegen350M-qlora" \ --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": "iamtarun/pycompetitive-codegen350M-qlora", "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 "iamtarun/pycompetitive-codegen350M-qlora" \ --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": "iamtarun/pycompetitive-codegen350M-qlora", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use iamtarun/pycompetitive-codegen350M-qlora with Docker Model Runner:
docker model run hf.co/iamtarun/pycompetitive-codegen350M-qlora
Update README.md
Browse files
README.md
CHANGED
|
@@ -10,7 +10,7 @@ pipeline_tag: text-generation
|
|
| 10 |
tags:
|
| 11 |
- code
|
| 12 |
widget:
|
| 13 |
-
- text: "Below is a problem description that describes the problem. Write code in Python that appropriately solves the problem.\n\n### Description:\nMr. Chanek has an integer represented by a string s. Zero or more digits have been erased and are denoted by the character _. There are also zero or more digits marked by the character X, meaning they're the same digit. Mr. Chanek wants to count the number of possible integer s, where s is divisible by 25. Of course, s must not contain any leading zero. He can replace the character _ with any digit. He can also replace the character X with any digit, but it must be the same for every character X. As a note, a leading zero is any 0 digit that comes before the first nonzero digit in a number string in positional notation. For example, 0025 has two leading zeroes. An exception is the integer zero, (0 has no leading zero, but 0000 has three leading zeroes). Input One line containing the string s (1 ≤ |s| ≤ 8). The string s consists of the characters 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, _, and X. Output Output an integer denoting the number of possible integer s. Examples Input 25 Output 1 Input _00 Output 9 Input _XX Output 9 Input 0 Output 1 Input 0_25 Output 0 Note In the first example, the only possible s is 25. In the second and third example, s ∈ {100, 200,300,400,500,600,700,800,900}. In the fifth example, all possible s will have at least one leading zero.\n\n### Input:
|
| 14 |
example_title: "Code Example 1"
|
| 15 |
---
|
| 16 |
|
|
|
|
| 10 |
tags:
|
| 11 |
- code
|
| 12 |
widget:
|
| 13 |
+
- text: "Below is a problem description that describes the problem. Write code in Python that appropriately solves the problem.\n\n### Description:\nMr. Chanek has an integer represented by a string s. Zero or more digits have been erased and are denoted by the character _. There are also zero or more digits marked by the character X, meaning they're the same digit. Mr. Chanek wants to count the number of possible integer s, where s is divisible by 25. Of course, s must not contain any leading zero. He can replace the character _ with any digit. He can also replace the character X with any digit, but it must be the same for every character X. As a note, a leading zero is any 0 digit that comes before the first nonzero digit in a number string in positional notation. For example, 0025 has two leading zeroes. An exception is the integer zero, (0 has no leading zero, but 0000 has three leading zeroes). Input One line containing the string s (1 ≤ |s| ≤ 8). The string s consists of the characters 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, _, and X. Output Output an integer denoting the number of possible integer s. Examples Input 25 Output 1 Input _00 Output 9 Input _XX Output 9 Input 0 Output 1 Input 0_25 Output 0 Note In the first example, the only possible s is 25. In the second and third example, s ∈ {100, 200,300,400,500,600,700,800,900}. In the fifth example, all possible s will have at least one leading zero.\n\n### Input:\n0\n\n### Output:\n1\n\n\n### Input:\n_XX\n\n### Output:\n9\n\n\n### Code:\n"
|
| 14 |
example_title: "Code Example 1"
|
| 15 |
---
|
| 16 |
|