Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions templates/DeepCoder-1.5B/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# DeepCoder-1.5B Preview

A high-performance code generation model served via vLLM with an OpenAI-compatible API endpoint.

## Description

This template The model is specifically trained for code generation and understanding across multiple programming languages.

## Key Features
- High-performance inference with vLLM
- OpenAI-compatible API
- Specialized in code generation
- Multi-language support
- Optimized for GPU acceleration

## Configuration
- Port: 8000
- GPU: Required (24GB+ VRAM)
- Model: agentica-org/DeepCoder-1.5B-Preview
- Context Length: 8192 tokens

## Usage
You can interact with the model using the OpenAI API format:
```python
from openai import OpenAI


openai_api_key = "EMPTY"
openai_api_base = "https://fletcsut7rq2xsjcqw8vvfldgopf273zizxmbdtwqrjp.node.k8s.prd.nos.ci/v1" # my deployed nosara job

client = OpenAI(
api_key=openai_api_key,
base_url=openai_api_base,
)
completion = client.completions.create(model="agentica-org/DeepCoder-1.5B-Preview",
prompt="Write me a simple binary search in python" , max_tokens=5000)

print(completion.choices[0].text)
```

## License
This model is available for research and commercial use. Please check the model card for the most up-to-date licensing information.

## Nosana Run
https://dashboard.nosana.com/jobs/89JkqUAY3y1MULRp7QLRovguDad169CgBkfiVPSBKvxt
12 changes: 12 additions & 0 deletions templates/DeepCoder-1.5B/info.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"id": "deepcoder-1.5b",
"name": "DeepCoder 1.5B",
"description": "High-performance code generation model by Agentica Org with OpenAI-compatible API endpoint",
"category": [
"AI",
"Code Generation",
"Development"
],
"icon": "https://cdn-avatars.huggingface.co/v1/production/uploads/652867b09903f7a1c9f7cbf1/s5AyAWwXFutyA_GY0Ct1e.jpeg"
}

27 changes: 27 additions & 0 deletions templates/DeepCoder-1.5B/job-definition.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"version": "0.1",
"type": "container",
"meta": {
"trigger": "dashboard",
"system_requirements": {
"required_vram": 8
}
},
"ops": [
{
"type": "container/run",
"id": "deepcoder-1.5b",
"args": {
"entrypoint": [],
"cmd": [
"/bin/sh",
"-c",
"python3 -m vllm.entrypoints.openai.api_server --model agentica-org/DeepCoder-1.5B-Preview --port 9000 --max-model-len 32000"
],
"image": "docker.io/vllm/vllm-openai:v0.7.2",
"gpu": true,
"expose": 9000
}
}
]
}
75 changes: 75 additions & 0 deletions templates/Shap-E Text-to-3D/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
# Shap-E Text to 3D Generator

## Description
This template provides an easy way to generate 3D models from text descriptions using OpenAI's Shap-E model via Huggingface. The model transforms text prompts into animated 3D objects and exports them as GIF files that show the object from multiple angles.

## Features
- Convert text descriptions to 3D models
- Uses OpenAI's Shap-E model from Huggingface
- GPU-accelerated for optimal performance
- Outputs animated GIFs showing the 3D object from different angles
- Customizable guidance scale and inference steps

## Technical Details
- Model: `openai/shap-e`
- Default guidance scale: 15.0
- Default inference steps: 64
- Output format: Animated GIF

## Requirements
- GPU resources for efficient processing

## Usage
1. Enter your desired text prompt in the PROMPT environment variable
2. Run the job through the Nosana dashboard
3. Download the generated animated GIF from the output directory

## Example Prompts

<table align="center">
<tbody>
<tr>
<td align="center">
<img src="shark_3d.gif" alt="A shark">
</td>
<td align="center">
<img src="elephant_3d.gif" alt="An elephant">
</td align="center">
</tr>
<tr>
<td align="center">A shark</td>
<td align="center">An elephant </td>
</tr>
</tbody>
<table>

## How It Works
The job uses the Shap-E diffusion model from OpenAI, which has been trained to generate 3D shapes from text descriptions. The model creates a 3D representation that is then rendered from multiple angles to create an animated GIF.

```python
import torch
from diffusers import ShapEPipeline
from diffusers.utils import export_to_gif

ckpt_id = "openai/shap-e"
pipe = ShapEPipeline.from_pretrained(ckpt_id).to("cuda")

guidance_scale = 15.0
prompt = "a shark"
images = pipe(
prompt,
guidance_scale=guidance_scale,
num_inference_steps=64,
).images

gif_path = export_to_gif(images[0], "shark_3d.gif")
```

## Links
- [Shap-E Model on Huggingface](https://huggingface.co/openai/shap-e)

- Details of Successful Nosara Run.

![Example Successful Nosana Job](https://gcdnb.pbrd.co/images/Gz4dueL9DmbM.png)


Binary file added templates/Shap-E Text-to-3D/elephant_3d.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions templates/Shap-E Text-to-3D/info.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"id": "shap-e-text-to-3d",
"name": "Shap-E Text to 3D Generator",
"description": "Generate 3D models from text prompts using OpenAI's Shap-E model from Huggingface",
"category": ["AI", "3D Generation", "Huggingface"],
"icon": "https://gcdnb.pbrd.co/images/fVCxCflg7jxU.png"
}
28 changes: 28 additions & 0 deletions templates/Shap-E Text-to-3D/job-definition.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"ops": [
{
"id": "shap-E",
"args": {
"cmd": [
"/bin/sh",
"-c",
"apt-get update && apt-get install -y git && git clone https://github.com/eskayML/shap-E-Text-to-3D && cd shap-E-Text-to-3D && pip install -r requirements.txt && pip install huggingface-hub && mkdir openai && cd openai && huggingface-cli download openai/shap-e --local-dir . --local-dir-use-symlinks False && cd ../ && python app.py --host 0.0.0.0 --port 7860"
],
"env": {},
"gpu": true,
"image": "pytorch/pytorch:2.0.0-cuda11.7-cudnn8-runtime",
"expose": 7860,
"entrypoint": []
},
"type": "container/run"
}
],
"meta": {
"trigger": "dashboard",
"system_requirements": {
"required_vram": 16
}
},
"type": "container",
"version": "0.1"
}
Binary file added templates/Shap-E Text-to-3D/shark_3d.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.