Text Generation
Transformers
Safetensors
PyTorch
English
llama
python
java
cpp
sql
function calling
unit tests
causalLM
codeLLAMA modified archi
document
code
code2doc
instruction_tuned
basemodel
docstring
documentation
text-generation-inference
plan
planner
conversational
Instructions to use PipableAI/pip-code-bandit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use PipableAI/pip-code-bandit with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="PipableAI/pip-code-bandit") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("PipableAI/pip-code-bandit") model = AutoModelForCausalLM.from_pretrained("PipableAI/pip-code-bandit") 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]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use PipableAI/pip-code-bandit with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "PipableAI/pip-code-bandit" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "PipableAI/pip-code-bandit", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/PipableAI/pip-code-bandit
- SGLang
How to use PipableAI/pip-code-bandit 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 "PipableAI/pip-code-bandit" \ --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": "PipableAI/pip-code-bandit", "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 "PipableAI/pip-code-bandit" \ --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": "PipableAI/pip-code-bandit", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use PipableAI/pip-code-bandit with Docker Model Runner:
docker model run hf.co/PipableAI/pip-code-bandit
Update README.md
Browse files
README.md
CHANGED
|
@@ -34,7 +34,7 @@ widget:
|
|
| 34 |
|
| 35 |
[colab_notebook](https://colab.research.google.com/drive/10av3SxFf0Psx_IkmZbcUhiVznStV5pVS?usp=sharing)
|
| 36 |
|
| 37 |
-
[
|
| 38 |
|
| 39 |
[linkedin_post]()
|
| 40 |
|
|
@@ -48,15 +48,11 @@ widget:
|
|
| 48 |
|
| 49 |
|
| 50 |
Given a goal and tools can Ai intelligently use the tools to reach the goal ?
|
| 51 |
-
|
| 52 |
What if it has a meagre 1.3b params/neurons akin to that of an owl ?
|
| 53 |
-
|
| 54 |
Can it follow instructions and plan to reach a goal ?
|
| 55 |
-
|
| 56 |
Apparently it can.
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
Releasing `pip-code-bandit` and `pip_flow` a model and a library to manage and run goal oriented agentic system.
|
| 60 |
|
| 61 |
|
| 62 |
## Model attributes
|
|
@@ -93,20 +89,14 @@ The model is open source under apache 2.0. License
|
|
| 93 |
|
| 94 |
## Usage
|
| 95 |
|
|
|
|
| 96 |
### NOTE:
|
| 97 |
|
| 98 |
|
| 99 |
|
| 100 |
### Library use
|
| 101 |
|
| 102 |
-
For directly using the capabilities of model without putting extra efforts on schems and prompts try to use [
|
| 103 |
-
|
| 104 |
-
Here's a brief overview of what can be achieved using the PipEtl library:
|
| 105 |
-
|
| 106 |
-
- `Function Call Generation` : The generate_function_call method facilitates the generation of Python function calls based on provided questions and either docstrings or undocumented code. This feature can be useful for generating example function calls or for prototyping code snippets.
|
| 107 |
-
- `Automated Documentation Generation` : With the generate_docstring method, users can automatically generate comprehensive docstrings for Python functions. This feature aids in maintaining well-documented codebases and adhering to best practices.
|
| 108 |
-
- `Module Documentation` : The generate_module_docstrings method allows for generating documentation for all methods and functions within a given module or package. This capability streamlines the documentation process, especially for large codebases with numerous functions.
|
| 109 |
-
- `SQL Query Generation` : Users can leverage the generate_sql method to automatically generate SQL queries based on provided schemas and questions. This functionality simplifies the process of creating SQL queries, particularly for data-related tasks.
|
| 110 |
|
| 111 |
For detailed usage refer to the [colab_notebook](https://colab.research.google.com/drive/10av3SxFf0Psx_IkmZbcUhiVznStV5pVS?usp=sharing)
|
| 112 |
|
|
|
|
| 34 |
|
| 35 |
[colab_notebook](https://colab.research.google.com/drive/10av3SxFf0Psx_IkmZbcUhiVznStV5pVS?usp=sharing)
|
| 36 |
|
| 37 |
+
[pipflow](https://github.com/PipableAI/pipflow)
|
| 38 |
|
| 39 |
[linkedin_post]()
|
| 40 |
|
|
|
|
| 48 |
|
| 49 |
|
| 50 |
Given a goal and tools can Ai intelligently use the tools to reach the goal ?
|
|
|
|
| 51 |
What if it has a meagre 1.3b params/neurons akin to that of an owl ?
|
|
|
|
| 52 |
Can it follow instructions and plan to reach a goal ?
|
|
|
|
| 53 |
Apparently it can.
|
| 54 |
+
Releasing `pip-code-bandit` and `pipflow`
|
| 55 |
+
-- a model and a library to manage and run goal oriented agentic system.
|
|
|
|
| 56 |
|
| 57 |
|
| 58 |
## Model attributes
|
|
|
|
| 89 |
|
| 90 |
## Usage
|
| 91 |
|
| 92 |
+
|
| 93 |
### NOTE:
|
| 94 |
|
| 95 |
|
| 96 |
|
| 97 |
### Library use
|
| 98 |
|
| 99 |
+
For directly using the capabilities of model without putting extra efforts on schems and prompts try to use [pipflow](https://github.com/PipableAI/pipflow).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 100 |
|
| 101 |
For detailed usage refer to the [colab_notebook](https://colab.research.google.com/drive/10av3SxFf0Psx_IkmZbcUhiVznStV5pVS?usp=sharing)
|
| 102 |
|