Blog
Subscribe to stay up to date with new posts from Tensorfuse.
Subscribe to stay up to date with new posts from Tensorfuse.
Sep 3, 2024
Why do GPU Containers have long Cold Starts?
Jun 20, 2024
What is serverless GPU computing?
Jun 3, 2024
Increase GPU Quota on AWS: A Comprehensive Guide
May 22, 2024
From Naive RAGs to Advanced: Improving your Retrieval
Get started with Tensorfuse today.
Deploy in minutes, scale in seconds.
import tensorkube
image = tensorkube.Image.from_registry(
"nvidia/cuda" ).add_python(version='3.9')
.apt_install([ 'git','git-lfs' ])
.pip_install([ 'transformers', 'torch', 'torchvision', 'tensorrt', ])
.env( { 'SOME-RANDOM-SECRET-KEY': 'xxx-xyz-1234-abc-5678', } )
.run_custom_function( download_and_quantize_model, )
@tensorkube.entrypoint(image, gpu = 'A10G')
def load_model_on_gpu():
import transformers
model = transformers.BertModel.from_pretrained('bert-base-uncased')
model.to('cuda')
tensorkube.pass_reference(model, 'model')
@tensorkube.function(image)
def infer(input: str):
model = tensorkube.get_reference('model')
# test the model on input
response = model(input)
return response
Get started with Tensorfuse today.
Deploy in minutes, scale in seconds.
import tensorkube
image = tensorkube.Image.from_registry(
"nvidia/cuda" ).add_python(version='3.9')
.apt_install([ 'git','git-lfs' ])
.pip_install([ 'transformers', 'torch', 'torchvision', 'tensorrt', ])
.env( { 'SOME-RANDOM-SECRET-KEY': 'xxx-xyz-1234-abc-5678', } )
.run_custom_function( download_and_quantize_model, )
@tensorkube.entrypoint(image, gpu = 'A10G')
def load_model_on_gpu():
import transformers
model = transformers.BertModel.from_pretrained('bert-base-uncased')
model.to('cuda')
tensorkube.pass_reference(model, 'model')
@tensorkube.function(image)
def infer(input: str):
model = tensorkube.get_reference('model')
# test the model on input
response = model(input)
return response
Get started with Tensorfuse today.
Deploy in minutes, scale in seconds.
import tensorkube
image = tensorkube.Image.from_registry(
"nvidia/cuda" ).add_python(version='3.9')
.apt_install([ 'git','git-lfs' ])
.pip_install([ 'transformers', 'torch', 'torchvision', 'tensorrt', ])
.env( { 'SOME-RANDOM-SECRET-KEY': 'xxx-xyz-1234-abc-5678', } )
.run_custom_function( download_and_quantize_model, )
@tensorkube.entrypoint(image, gpu = 'A10G')
def load_model_on_gpu():
import transformers
model = transformers.BertModel.from_pretrained('bert-base-uncased')
model.to('cuda')
tensorkube.pass_reference(model, 'model')
@tensorkube.function(image)
def infer(input: str):
model = tensorkube.get_reference('model')
# test the model on input
response = model(input)
return response
© 2024. All rights reserved.
Privacy Policy