Run this model with HF Jobs
Run safaricd/tmp on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/safaricd/tmp. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/safaricd/tmp on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Instructions to use safaricd/tmp with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use safaricd/tmp with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("codellama/CodeLlama-7b-hf") model = PeftModel.from_pretrained(base_model, "safaricd/tmp") - Notebooks
- Google Colab
- Kaggle
Training in progress, epoch 1
Browse filesFiles changed (8)
18 unmodified lines1920212223242526272829303118 unmodified lines"rank_pattern": {},"revision": null,"target_modules": ["up_proj","o_proj","k_proj","gate_proj","q_proj","down_proj","v_proj"],"task_type": "CAUSAL_LM","use_rslora": false18 unmodified lines1920212223242526272829303118 unmodified lines"rank_pattern": {},"revision": null,"target_modules": ["v_proj","down_proj","q_proj","up_proj","k_proj","gate_proj","o_proj"],"task_type": "CAUSAL_LM","use_rslora": false
123version https://git-lfs.github.com/spec/v1oid sha256:e92f82de5230f0325f712593d34e359445f49e7d9d62ef3fb29ecf1bbc991ad2size 1803907984123version https://git-lfs.github.com/spec/v1oid sha256:7d5dfcb47d2492bcd381c74fff215f0c601db4a68fcf916e38070d7d97898d38size 1803940752
1234{"<|im_end|>": 32016,"<|im_start|>": 32017}123456{"DIALECT": 32018,"[/DIALECT]": 32017,"[PAD]": 32019,"[SQL]": 32016}
12345678910111213141516171819202122232425262728{"additional_special_tokens": [{"content": "<|im_end|>","lstrip": false,"normalized": false,"rstrip": false,"single_word": false},{"content": "<|im_start|>","lstrip": false,"normalized": false,"rstrip": false,"single_word": false}],"bos_token": "<|im_start|>","eos_token": "<|im_end|>","pad_token": "<|im_end|>","unk_token": {"content": "<unk>","lstrip": false,"normalized": false,"rstrip": false,"single_word": false}}1234567891011121314151617181920212223242526272829303132333435{"additional_special_tokens": [{"content": "[SQL]","lstrip": false,"normalized": false,"rstrip": false,"single_word": false},{"content": "[/DIALECT]","lstrip": false,"normalized": false,"rstrip": false,"single_word": false},{"content": "DIALECT","lstrip": false,"normalized": false,"rstrip": false,"single_word": false}],"bos_token": "<s>","eos_token": "</s>","pad_token": {"content": "[PAD]","lstrip": false,"normalized": false,"rstrip": false,"single_word": false},"unk_token": "<unk>"}
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081from typing import *
import torchimport torch.distributed.rpc as rpcfrom torch import Tensorfrom torch._jit_internal import Futurefrom torch.distributed.rpc import RReffrom typing import Tuple # pyre-ignore: unused import
module_interface_cls = None
def forward_async(self, *args, **kwargs): args = (self.module_rref, self.device, self.is_device_map_set, *args) kwargs = {**kwargs} return rpc.rpc_async( self.module_rref.owner(), _remote_forward, args, kwargs, )
def forward(self, *args, **kwargs): args = (self.module_rref, self.device, self.is_device_map_set, *args) kwargs = {**kwargs} ret_fut = rpc.rpc_async( self.module_rref.owner(), _remote_forward, args, kwargs, ) return ret_fut.wait()
_generated_methods = [ forward_async, forward,]
def _remote_forward( module_rref: RRef[module_interface_cls], device: str, is_device_map_set: bool, *args, **kwargs): module = module_rref.local_value() device = torch.device(device)
if device.type != "cuda": return module.forward(*args, **kwargs)
# If the module is on a cuda device, # move any CPU tensor in args or kwargs to the same cuda device. # Since torch script does not support generator expression, # have to use concatenation instead of # ``tuple(i.to(device) if isinstance(i, Tensor) else i for i in *args)``. args = (*args,) out_args: Tuple[()] = () for arg in args: arg = (arg.to(device),) if isinstance(arg, Tensor) else (arg,) out_args = out_args + arg
kwargs = {**kwargs} for k, v in kwargs.items(): if isinstance(v, Tensor): kwargs[k] = kwargs[k].to(device)
if is_device_map_set: return module.forward(*out_args, **kwargs)
# If the device map is empty, then only CPU tensors are allowed to send over wire, # so have to move any GPU tensor to CPU in the output. # Since torch script does not support generator expression, # have to use concatenation instead of # ``tuple(i.cpu() if isinstance(i, Tensor) else i for i in module.forward(*out_args, **kwargs))``. ret: Tuple[()] = () for i in module.forward(*out_args, **kwargs): i = (i.cpu(),) if isinstance(i, Tensor) else (i,) ret = ret + i return ret12345661 unmodified lines686970717273742 unmodified lines77787980818283{"version": "1.0","truncation": null,"padding": null,"added_tokens": [{61 unmodified lines},{"id": 32016,"content": "<|im_end|>","single_word": false,"lstrip": false,"rstrip": false,2 unmodified lines},{"id": 32017,"content": "<|im_start|>","single_word": false,"lstrip": false,"rstrip": false,123456789101161 unmodified lines737475767778792 unmodified lines828384858687888990919293949596979899100101102103104105106{"version": "1.0","truncation": {"direction": "Right","max_length": 3072,"strategy": "LongestFirst","stride": 0},"padding": null,"added_tokens": [{61 unmodified lines},{"id": 32016,"content": "[SQL]","single_word": false,"lstrip": false,"rstrip": false,2 unmodified lines},{"id": 32017,"content": "[/DIALECT]","single_word": false,"lstrip": false,"rstrip": false,"normalized": false,"special": true},{"id": 32018,"content": "DIALECT","single_word": false,"lstrip": false,"rstrip": false,"normalized": false,"special": true},{"id": 32019,"content": "[PAD]","single_word": false,"lstrip": false,"rstrip": false,
58 unmodified lines596061626364651 unmodified line676869707172732 unmodified lines7677787980818283848586878889909192939458 unmodified lines"special": true},"32016": {"content": "<|im_end|>","lstrip": false,"normalized": false,"rstrip": false,1 unmodified line"special": true},"32017": {"content": "<|im_start|>","lstrip": false,"normalized": false,"rstrip": false,2 unmodified lines}},"additional_special_tokens": ["<|im_end|>","<|im_start|>"],"bos_token": "<|im_start|>","chat_template": "{% for message in messages %}{{'<|im_start|>' + message['role'] + '\n' + message['content'] + '<|im_end|>' + '\n'}}{% endfor %}{% if add_generation_prompt %}{{ '<|im_start|>assistant\n' }}{% endif %}","clean_up_tokenization_spaces": false,"eos_token": "<|im_end|>","eot_token": "▁<EOT>","fill_token": "<FILL_ME>","legacy": null,"middle_token": "▁<MID>","model_max_length": 1000000000000000019884624838656,"pad_token": "<|im_end|>","prefix_token": "▁<PRE>","sp_model_kwargs": {},"suffix_token": "▁<SUF>",58 unmodified lines596061626364651 unmodified line67686970717273747576777879808182838485868788892 unmodified lines929394959697989910010110210310410510610710810911058 unmodified lines"special": true},"32016": {"content": "[SQL]","lstrip": false,"normalized": false,"rstrip": false,1 unmodified line"special": true},"32017": {"content": "[/DIALECT]","lstrip": false,"normalized": false,"rstrip": false,"single_word": false,"special": true},"32018": {"content": "DIALECT","lstrip": false,"normalized": false,"rstrip": false,"single_word": false,"special": true},"32019": {"content": "[PAD]","lstrip": false,"normalized": false,"rstrip": false,2 unmodified lines}},"additional_special_tokens": ["[SQL]","[/DIALECT]","DIALECT"],"bos_token": "<s>","clean_up_tokenization_spaces": false,"eos_token": "</s>","eot_token": "▁<EOT>","fill_token": "<FILL_ME>","legacy": null,"middle_token": "▁<MID>","model_max_length": 1000000000000000019884624838656,"pad_token": "[PAD]","prefix_token": "▁<PRE>","sp_model_kwargs": {},"suffix_token": "▁<SUF>",
123version https://git-lfs.github.com/spec/v1oid sha256:4bafe043d2711fd6e68d65399d3d57e5bfff724c77431558500c810926dc46easize 4664123version https://git-lfs.github.com/spec/v1oid sha256:42e79e5a8a5acfb7f938b2a7d99d219ffaf4aa5de423917c0649be9238a74814size 4664
adapter_config.json+4-4
adapter_model.safetensors+2-2
added_tokens.json+4-2
special_tokens_map.json+15-8
tmpdr2e1dme/_remote_module_non_scriptable.pyAdded+81
tokenizer.json+26-3
tokenizer_config.json+24-8
training_args.bin+1-1