yujiepan / dbrx-tiny-random

huggingface.co
Total runs: 330
24-hour runs: 6
7-day runs: 169
30-day runs: 193
Model's Last Updated: April 19 2024
text-generation

Introduction of dbrx-tiny-random

Model Details of dbrx-tiny-random

This model is randomly initialized, using the config from databricks/dbrx-instruct but with smaller size. Note the model is in float16.

Codes:

import transformers
import torch
import os
from huggingface_hub import create_repo, upload_folder

source_model_id = 'databricks/dbrx-instruct'
save_path = '/tmp/yujiepan/dbrx-tiny-random'
repo_id = 'yujiepan/dbrx-tiny-random'

config = transformers.AutoConfig.from_pretrained(
    source_model_id, trust_remote_code=True)
config.attn_config.kv_n_heads = 2
config.d_model = 4
config.ffn_config.ffn_hidden_size = 8
config.n_heads = 4
config.n_layers = 2

model = transformers.AutoModelForCausalLM.from_config(
    config, trust_remote_code=True)
model = model.half()
model.save_pretrained(save_path)

tokenizer = transformers.AutoTokenizer.from_pretrained(
    source_model_id, trust_remote_code=True)
tokenizer.save_pretrained(save_path)

result = transformers.pipelines.pipeline(
    'text-generation',
    model=model.float(), tokenizer=tokenizer)('Hello')
print(result)

os.system(f'ls -alh {save_path}')
create_repo(repo_id, exist_ok=True)
upload_folder(repo_id=repo_id, folder_path=save_path)

Runs of yujiepan dbrx-tiny-random on huggingface.co

330
Total runs
6
24-hour runs
51
3-day runs
169
7-day runs
193
30-day runs

More Information About dbrx-tiny-random huggingface.co Model

dbrx-tiny-random huggingface.co

dbrx-tiny-random huggingface.co is an AI model on huggingface.co that provides dbrx-tiny-random's model effect (), which can be used instantly with this yujiepan dbrx-tiny-random model. huggingface.co supports a free trial of the dbrx-tiny-random model, and also provides paid use of the dbrx-tiny-random. Support call dbrx-tiny-random model through api, including Node.js, Python, http.

dbrx-tiny-random huggingface.co Url

https://huggingface.co/yujiepan/dbrx-tiny-random

yujiepan dbrx-tiny-random online free

dbrx-tiny-random huggingface.co is an online trial and call api platform, which integrates dbrx-tiny-random's modeling effects, including api services, and provides a free online trial of dbrx-tiny-random, you can try dbrx-tiny-random online for free by clicking the link below.

yujiepan dbrx-tiny-random online free url in huggingface.co:

https://huggingface.co/yujiepan/dbrx-tiny-random

dbrx-tiny-random install

dbrx-tiny-random is an open source model from GitHub that offers a free installation service, and any user can find dbrx-tiny-random on GitHub to install. At the same time, huggingface.co provides the effect of dbrx-tiny-random install, users can directly use dbrx-tiny-random installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

dbrx-tiny-random install url in huggingface.co:

https://huggingface.co/yujiepan/dbrx-tiny-random

Url of dbrx-tiny-random

dbrx-tiny-random huggingface.co Url

Provider of dbrx-tiny-random huggingface.co

yujiepan
ORGANIZATIONS

Other API from yujiepan