rbharmal commited on
Commit
b446b29
·
verified ·
1 Parent(s): 3501fd7

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +64 -3
README.md CHANGED
@@ -1,3 +1,64 @@
1
- ---
2
- license: apache-2.0
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ tags:
4
+ - codestral-22b
5
+ - unsloth
6
+ - finetuned
7
+ - large-language-model
8
+ - typeinference
9
+ - python
10
+ language:
11
+ - en
12
+ datasets:
13
+ - rbharmal/ManyType4Py
14
+ base_model:
15
+ - mistralai/Codestral-22B-v0.1
16
+ model_name: rbharmal/finetuned_Codestral-22B-v0.1
17
+ ---
18
+
19
+ # finetuned_Codestral-22B-v0.1
20
+
21
+ 🚀 **Finetuned version of [mistralai/Codestral-22B-v0.1](https://huggingface.co/mistralai/Codestral-22B-v0.1) by [rbharmal](https://huggingface.co/rbharmal).**
22
+
23
+ This model is finetuned for Type Inference in Python.
24
+ It was trained using [Unsloth](https://github.com/unslothai/unsloth) for optimized fine-tuning and uses merged LoRA weights for easier deployment.
25
+
26
+ ## Model Details
27
+ - **Base Model**: Codestral-22B-v0.1
28
+ - **Finetuning Method**: LoRA (merged)
29
+ - **Context Length**: 4,000 tokens
30
+ - **Quantization**: None (full precision, bfloat16)
31
+ - **Optimizations**: Gradient Checkpointing, 4-bit loading during training
32
+
33
+ ## How to Use
34
+
35
+ ```python
36
+ from transformers import AutoModelForCausalLM, AutoTokenizer
37
+
38
+ model = AutoModelForCausalLM.from_pretrained("rbharmal/finetuned_Codestral-22B-v0.1")
39
+ tokenizer = AutoTokenizer.from_pretrained("rbharmal/finetuned_Codestral-22B-v0.1")
40
+
41
+ prompt = "
42
+ ## Task Description
43
+
44
+ **Objective**: Examine and identify the data types of various elements such as function parameters, local variables, and function return types in the given Python code.
45
+
46
+ **Instructions**:
47
+ 1. For each question below, provide a concise, one-word answer indicating the data type.
48
+ 2. For arguments and variables inside a function, list every data type they take within the current program context as a comma separated list.
49
+ 3. Do not include additional explanations or commentary in your answers.
50
+ 4. If a type's nested level exceeds 2, replace all components at that level and beyond with Any
51
+
52
+ **Python Code Provided**:
53
+ def param_func(x):
54
+ return x
55
+
56
+ c = param_func("Hello")
57
+
58
+ **Questions**:
59
+ 1. What is the return type of the function 'param_func' at line 1, column 5?
60
+ 2. What is the type of the parameter 'x' at line 1, column 15, in the function 'param_func'?
61
+ 3. What is the type of the variable 'c' at line 4, column 1? "
62
+ inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
63
+ outputs = model.generate(**inputs, max_new_tokens=200)
64
+ print(tokenizer.decode(outputs[0], skip_special_tokens=True))