Skip to content

Commit

Permalink
Add: Placeholder for JavaScript SDK
Browse files Browse the repository at this point in the history
  • Loading branch information
ashvardanian committed Apr 16, 2024
1 parent 30d40a0 commit acbb77a
Show file tree
Hide file tree
Showing 14 changed files with 522 additions and 679 deletions.
9 changes: 7 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,13 @@ test
build/
package-lock.json
*.egg-info
*.onnx
__pycache__
.build
.swiftpm
node_modules
.hf_token
node_modules

# Tensors & ML Model
*.onnx
*.pt
*.safetensors
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,11 @@ For Content Understanding and Generation<br/>
<p align="center">
Multimodal Embeddings from 64 to 768 Dimensions • 1B Parameter Chat
<br/>
Short Texts • Images • 🔜 Video Clips
Short Texts • Images • 🔜 Video Clips • 🔜 Long Documents
<br/>
PyTorch • ONNX
ONNX • CoreML • PyTorch
<br/>
Python • JavaScript • Swift
</p>

---
Expand Down Expand Up @@ -279,7 +281,7 @@ The generative model can be used to caption images, summarize their content, or
The exact behavior is controlled by prompts.

```python
from uform.gen_model import VLMForCausalLM, VLMProcessor
from uform.torch_decoders import VLMForCausalLM, VLMProcessor

model = VLMForCausalLM.from_pretrained('unum-cloud/uform-gen')
processor = VLMProcessor.from_pretrained('unum-cloud/uform-gen')
Expand Down
10 changes: 10 additions & 0 deletions javascript/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# UForm for JavaScript



```bash
pnpm add uform
npm add uform
yarn add uform
```

11 changes: 11 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"name": "uform",
"private": true,
"version": "2.0.2",
"description": "Pocket-Sized Multimodal AI for Content Understanding and Generation",
"dependencies": {
"@huggingface/hub": "^0.14.8",
"@xenova/transformers": "^2.17.0",
"onnxruntime-web": "^1.17.3"
}
}
2 changes: 1 addition & 1 deletion python/scripts/bench.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
)

from uform import get_model
from uform.gen_model import VLMForCausalLM, VLMProcessor
from uform.torch_decoders import VLMForCausalLM, VLMProcessor

dtype = torch.bfloat16
low_cpu_mem_usage = False
Expand Down
Loading

0 comments on commit acbb77a

Please sign in to comment.