Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CodeGPTPlus/deepseek-coder-1.3b-typescript · Hugging Face #498

Open
1 task
irthomasthomas opened this issue Feb 1, 2024 · 0 comments
Open
1 task

CodeGPTPlus/deepseek-coder-1.3b-typescript · Hugging Face #498

irthomasthomas opened this issue Feb 1, 2024 · 0 comments
Labels
code-generation code generation models and tools like copilot and aider finetuning Tools for finetuning of LLMs e.g. SFT or RLHF llm Large Language Models MachineLearning ML Models, Training and Inference Models LLM and ML model repos and links source-code Code snippets TIL Short notes or tips on coding, linux, llms, ml, etc

Comments

@irthomasthomas
Copy link
Owner

CodeGPTPlus/deepseek-coder-1.3b-typescript

This is a fine-tuned model by the CodeGPT team, specifically crafted for generating expert code in TypeScript. It is fine-tuned from deepseek-ai/deepseek-coder-1.3b-base with a dataset of 0.5B tokens, making it an excellent choice for precise and efficient TypeScript code generation.

The model uses a 16K window size and an additional fill-in-the-middle task for project-level code completion.

How to Use

This model is for completion purposes only. Here are some examples of how to use the model:

Running the model on a GPU

from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("CodeGPTPlus/deepseek-coder-1.3b-typescript", trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained("CodeGPTPlus/deepseek-coder-1.3b-typescript", trust_remote_code=True).cuda()

input_text = """<|fim begin|>function quickSort(arr: number[]): number[] {
  if (arr.length <= 1) {
    return arr;
  }
  const pivot = arr[0];
  const left = [];
  const right = [];
<|fim hole|>
  return [...quickSort(left), pivot, ...quickSort(right)];
}<|fim end|>"""

inputs = tokenizer(input_text, return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_length=256)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))

Running with Ollama

Running with Ollama and CodeGPT Autocomplete in VSCode

Fill In the Middle (FIM)

<|fim begin|>function quickSort(arr: number[]): number[] {
  if (arr.length <= 1) {
    return arr;
  }
  const pivot = arr[0];
  const left = [];
  const right = [];
<|fim hole|>
  return [...quickSort(left), pivot, ...quickSort(right)];
}<|fim end|>

Training Procedure

The model was trained using the following hyperparameters:

  • learning_rate: 2e-05
  • train_batch_size: 20
  • eval_batch_size: 20
  • seed: 42
  • gradient_accumulation_steps: 2
  • total_train_batch_size: 40
  • optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-06
  • lr_scheduler_type: cosine
  • lr_scheduler_warmup_steps: 261
  • num_epochs: 1

For more information, visit the model page.

Suggested labels

{ "label-name": "TypeScript-Code-Generation", "description": "Model for generating TypeScript code", "repo": "CodeGPTPlus/deepseek-coder-1.3b-typescript", "confidence": 70.59 }

@irthomasthomas irthomasthomas added code-generation code generation models and tools like copilot and aider MachineLearning ML Models, Training and Inference Models LLM and ML model repos and links New-Label Choose this option if the existing labels are insufficient to describe the content accurately source-code Code snippets TIL Short notes or tips on coding, linux, llms, ml, etc and removed New-Label Choose this option if the existing labels are insufficient to describe the content accurately labels Feb 1, 2024
@irthomasthomas irthomasthomas added llm Large Language Models finetuning Tools for finetuning of LLMs e.g. SFT or RLHF labels Feb 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code-generation code generation models and tools like copilot and aider finetuning Tools for finetuning of LLMs e.g. SFT or RLHF llm Large Language Models MachineLearning ML Models, Training and Inference Models LLM and ML model repos and links source-code Code snippets TIL Short notes or tips on coding, linux, llms, ml, etc
Projects
None yet
Development

No branches or pull requests

1 participant